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 fun foo
(a
, b
: nullable Int, c
, d
: Int, e
,f
: nullable Int)
20 if a
== null then '\n'.output
else a
.output
21 if b
== null then '\n'.output
else b
.output
24 if e
== null then '\n'.output
else e
.output
25 if f
== null then '\n'.output
else f
.output
31 fun bar
(a
,b
,c
: nullable Int)
33 if a
== null then '\n'.output
else a
.output
34 if b
== null then '\n'.output
else b
.output
35 if c
== null then '\n'.output
else c
.output
40 fun bar
=(a
,b
,c
: nullable Int)
42 if a
== null then '\n'.output
else a
.output
43 if b
== null then '\n'.output
else b
.output
44 if c
== null then '\n'.output
else c
.output
49 fun [](a
,b
,c
: nullable Int): Int
51 if a
== null then '\n'.output
else a
.output
52 if b
== null then '\n'.output
else b
.output
53 if c
== null then '\n'.output
else c
.output
59 fun []=(a
,b
,c
: nullable Int): Int
61 if a
== null then '\n'.output
else a
.output
62 if b
== null then '\n'.output
else b
.output
63 if c
== null then '\n'.output
else c
.output
69 fun +(a
: nullable Int): Int
71 if a
== null then '\n'.output
else a
.output
88 #alt1#a.foo(1,2,3,4,5,6,7)
99 #alt1#a.bar(1,2,3) = 40