e28d36ff6047f0b23c0f44bfdae39841b2581a59
[nit.git] / tests / base_ni.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
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
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14
15 import kernel
16
17 interface I
18 end
19
20 abstract class AC
21 end
22
23 class C
24 end
25
26 enum E
27 end
28
29 extern class EC
30 #alt1# super I
31 #alt2# super AC
32 #alt3# super C
33 #alt4# super E
34 fun foo do 1.output
35 #alt5# var x: Int
36 end
37
38 class I2
39 #alt6# super EC
40 end
41
42 class AC2
43 #alt7# super EC
44 end
45
46 class C2
47 #alt8# super EC
48 end
49
50 class E2
51 #alt9# super EC
52 end
53
54 fun inita: EC is extern
55
56 var a = inita
57 #alt10# a = new EC
58 a.foo
59