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 new do return new B
(1)
19 new n2
do return new B
(2)
20 new n3
: B
do return new B
(3)
21 new n4
: Int do return 4
22 new n5
: Int do return new B
.ni
(5)
23 #alt1#new n do return 5
24 #alt2#new n do 0.output
25 #alt3#new n do return self
26 #alt4#new n: Int do return object_id
36 new n2
do return new B
(22)
37 new n3
: B
do return new B
(33)
38 new n4
: Int do return 44
39 new n5
: Int do return new B
.ni
(55)
40 new ni
(i
: Int): Int do return i
*10
45 new(i
: Int): B
do return new B
(i
)
54 new(z
: Bool): B
do return new C
(1111)
59 new a
: A
do return new A
63 #alt5#(new A).i.output
65 #alt6#(new A.n2).i.output
69 #alt1-4#(new A.n).output
83 #alt7#(new C.n2).output
91 #alt8#(new Int).output