/[eiffelstudio]/trunk/eweasel/tests/exec370/test.e
ViewVC logotype

Contents of /trunk/eweasel/tests/exec370/test.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 100571 - (show annotations)
Wed Jul 5 09:44:36 2017 UTC (2 years, 2 months ago) by alexk
File size: 570 byte(s)
Added an example to demonstrate an issue with conditional expression where one of expressions is of an expanded type but the computed result is not wrapped to be a used as a reference object.
1 class TEST
2
3 create
4 make
5
6 feature {NONE} -- Creation
7
8 make
9 -- Run test.
10 local
11 a: A
12 x: COMPARABLE
13 do
14 x := ""
15
16 io.put_string ("Test #1: ")
17 print (if q then x else 5 end)
18 io.put_new_line
19
20 io.put_string ("Test #2: ")
21 print (if q then True else 5 end)
22 io.put_new_line
23
24 io.put_string ("Test #3: ")
25 print (if q then x else a end)
26 io.put_new_line
27
28 io.put_string ("Test #4: ")
29 print (if q then True else a end)
30 io.put_new_line
31 end
32
33 feature {NONE} -- Status report
34
35 q: BOOLEAN
36 -- A boolean value `False`.
37 do
38 end
39
40 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23