PageRenderTime 24ms CodeModel.GetById 22ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/unclassified/woj/test_woj01.e

http://github.com/tybor/Liberty
Specman e | 30 lines | 19 code | 8 blank | 3 comment | 0 complexity | 9fdbe72c20a8678947ef8087a474b113 MD5 | raw file
 1class TEST_WOJ01
 2   -- From: Wolfgang Jansen <wolfgang@agnld.uni-potsdam.de>
 3
 4create {}
 5   make
 6
 7feature {ANY}
 8   make
 9      do
10         create ref.make
11         -- (1) Use refence types:
12         def := ref
13         def.set(-99)
14         def := ref.twin
15         -- (2) Use expanded types:
16
17         create r_exp.set_item(exp)
18         def.set(123)
19         exp := exp.twin -- twin on a user expanded type !
20      end
21
22   def: AUX_WOJ01_DEF
23
24   ref: AUX_WOJ01_REF
25
26   exp: AUX_WOJ01_EXP
27
28   r_exp: REFERENCE[AUX_WOJ01_EXP]
29
30end -- class TEST_WOJ01