/[eiffelstudio]/trunk/eweasel/tests/fixed016/test_rev2.e
ViewVC logotype

Annotation of /trunk/eweasel/tests/fixed016/test_rev2.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 103556 - (hide annotations)
Mon Sep 30 13:23:53 2019 UTC (4 months, 2 weeks ago) by jfiat
File size: 947 byte(s)
Updated test code to use alias instead of infix/prefix.
1 manus 65296
2     --| Copyright (c) 1993-2006 University of Southern California and contributors.
3     --| All rights reserved.
4     --| Your use of this work is governed under the terms of the GNU General
5     --| Public License version 2.
6    
7     class TEST
8     creation
9     make
10     feature
11    
12     -- To reproduce error:
13     -- Compile this class as is.
14     -- Then uncomment out the two lines at end of `make'
15     -- and the declaration of `prefix "or"' below and rerun es3.
16     -- When it stops with syntax error, change both the declaration
17     -- of prefix "or" to prefix "+" and the call to `+ Current'.
18    
19     make is
20     local
21     s: STRING;
22     do
23     s := Current @index 3;
24     print (s);
25     s := Current @Index 3;
26     print (s);
27     s := Current @INDEX 3;
28     print (s);
29     s := + Current;
30     print (s);
31     end;
32    
33 jfiat 103556 g alias "@index" (a: INTEGER): STRING is
34 manus 65296 do
35     io.putstring ("In lowercase index%N");
36     Result := "1";
37     end;
38    
39    
40 jfiat 103556 i alias "+": STRING is
41 manus 65296 do
42     io.putstring ("In pre");
43     Result := "4";
44     end;
45    
46     end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23