1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 var e
: nullable E
= null
26 redef fun foo
do 2.output
31 redef fun foo
do 3.output
32 fun function_never_called
do 300.output
36 var gb
: G
[B
] = new G
[B
]
70 var ggb
: G
[G
[B
]] = new G
[G
[B
]]
71 var ggbe
: nullable G
[B
]
80 #alt4#ggb.e = ga.as(G[B])
86 var gga
: G
[G
[A
]] = ggb
94 var gc
: G
[A
] = new G
[C
]
97 #alt5#ggb.e = gc.as(G[B])
109 var ga2
: G
[A
] = new G
[A
]
112 #alt7#ggb.e = ga2.as(G[B])
124 # make the funtions live
125 if false then (new C
).function_never_called
126 if false then (new C
).foo