X-Git-Url: http://nitlanguage.org diff --git a/tests/base_attr_isset.nit b/tests/base_attr_isset.nit index bb60f8f..c1a1fea 100644 --- a/tests/base_attr_isset.nit +++ b/tests/base_attr_isset.nit @@ -19,28 +19,28 @@ import end interface Object end -universal Int +enum Int fun output is intern fun +(o: Int): Int is intern end -universal Bool +enum Bool fun output is intern end class Integer - readable writable var _val: Int - init(val: Int) do _val = val + var val: Int + fun output do _val.output end class Foo - var _a1: Integer - readable var _a2: Integer + var a1: Integer is noinit + var a2: Integer is noinit fun run do _a1.output - a2.output + _a2.output end fun show(i: Int) @@ -55,7 +55,7 @@ class Foo show(1) _a1 = new Integer(1) show(2) - _a2 = new Integer(_a1.val + 1) #!alt3# #!alt4# + _a2 = new Integer(_a1._val + 1) #alt3# #alt4# show(3) end #alt3# @@ -63,10 +63,10 @@ class Foo end class Bar -special Foo - var _a3: Integer#!alt1# #!alt2# - #alt1#var _a3: Integer = new Integer(9000) - #alt2#var _a3: nullable Integer + super Foo + var a3: Integer is noinit#alt1# #alt2# + #alt1#var a3: Integer = new Integer(9000) + #alt2#var a3: nullable Integer is noinit redef fun run do _a1.output @@ -82,7 +82,7 @@ special Foo init do - nop + if false then super # no auto super init call show(4) _a1 = new Integer(10) show(5) @@ -94,7 +94,7 @@ special Foo end class Baz -special Foo + super Foo end #alt4# var b2 = new Baz