PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/test/language/error_warning_msg/bad_call7.e

http://github.com/tybor/Liberty
Specman e | 72 lines | 33 code | 15 blank | 24 comment | 0 complexity | f9e9560b10c4cde7bbe79d1a9dadb28e MD5 | raw file
 1-- This file is part of SmartEiffel The GNU Eiffel Compiler Tools and Libraries.
 2-- See the Copyright notice at the end of this file.
 3--
 4class BAD_CALL7
 5--
 6-- To check warning about extra blank space between some manifest and the dot.
 7--
 8
 9create {}
10   make
11
12feature {}
13   make
14      local
15         string: STRING
16      do
17         string := "foo" .to_string                      -- <-- Warning #01 on this line.
18         "foo" .print_on(io)                             -- <-- Warning #02 on this line.
19
20         string := once "foo".to_string                  -- <-- Warning #03 on this line.
21         once "foo".print_on(io)                         -- <-- Warning #04 on this line.
22
23         string := (once "foo").to_string
24         (once "foo").print_on(io)
25
26         string := True .to_string                       -- <-- Warning #05 on this line.
27
28         string := False .to_string                      -- <-- Warning #06 on this line.
29
30         string := 7 .to_string                          -- <-- Warning #07 on this line.
31         8 .print_on(io)                                 -- <-- Warning #08 on this line.
32
33         string := {INTEGER_8 124} .to_string            -- <-- Warning #09 on this line.
34         {INTEGER_64 8} .print_on(io)                    -- <-- Warning #10 on this line.
35
36         string := 0xFF .to_string                       -- <-- Warning #11 on this line.
37         0x00 .print_on(io)                              -- <-- Warning #12 on this line.
38
39         string := 1.5 .to_string                        -- <-- Warning #13 on this line.
40         1.5 .print_on(io)                               -- <-- Warning #14 on this line.
41
42         string := {REAL_32 1.5 } .to_string             -- <-- Warning #15 on this line.
43         {REAL_32 1.5 } .print_on(io)                    -- <-- Warning #16 on this line.
44
45         string := 'a' .to_string                        -- <-- Warning #17 on this line.
46         'a' .print_on(io)                               -- <-- Warning #18 on this line.
47
48         string := {ARRAY[STRING] 1, <<"foo">> } .first  -- <-- Warning #19 on this line.
49         {ARRAY[STRING] 1, <<"foo">> } .print_on(io)     -- <-- Warning #20 on this line.
50
51         string := "foo". print_on(io)                   -- <-- Fatal error here.
52      end
53
54end -- class BAD_CALL7
55--
56-- ------------------------------------------------------------------------------------------------------------------------------
57-- Copyright notice below. Please read.
58--
59-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
60-- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
61-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
62-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
63-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
64-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
65--
66-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
67-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
68--
69-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
70--
71-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
72-- ------------------------------------------------------------------------------------------------------------------------------