1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Copyright 2014 Alexis Laferrière <alexis.laf@xymus.net>
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
18 new `{ return NULL; `}
24 new `{ return NULL; `}
25 redef fun foo
do print
"b"
30 new `{ return NULL; `}
31 redef fun foo do print "c"
41 redef type NATIVE: NativeB
46 redef type NATIVE: NativeC
49 for a in [new A(new NativeA), new B(new NativeB), new C(new NativeC)] do
53 var a = new A(new NativeA)
54 var b = new A(new NativeB)
55 var c = new B(new NativeB)
56 #alt1# var d = new B(new NativeA)
57 a.native = new NativeB
58 #alt2# c.native = new NativeA