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