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.
19 redef fun output
do v
.output
25 var b
: nullable I
= null
26 #alt2#var c: I = self.a
27 #alt3#var d: I = self.b.as(not null)
28 #alt4#var e: I = self.o.as(I)
29 #alt5#var f: I = self.initattr
30 #alt6#var g: I = self.getnull.a
32 fun initattr
: I
do abort
33 fun getnull
: nullable A
do return null
37 self.a
= new I
(1) #alt7#
38 self.b
= new I
(2) #alt8#