nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: intro `Float.lerp` for simple linear interpolation
[nit.git]
/
tests
/
base_attr_nullable_int.nit
diff --git
a/tests/base_attr_nullable_int.nit
b/tests/base_attr_nullable_int.nit
index
62e3679
..
03c7d88
100644
(file)
--- a/
tests/base_attr_nullable_int.nit
+++ b/
tests/base_attr_nullable_int.nit
@@
-18,22
+18,22
@@
import end
interface Object
end
interface Object
end
-
-universal Int
- meth output is intern
- meth +(o: Int): Int is intern
+enum Bool end
+enum Int
+ fun output is intern
+ fun +(o: Int): Int is intern
end
class Foo
end
class Foo
- attr _a1: Int
- readable attr _a2: Int
- meth run
+ var a1: Int is noinit
+ var a2: Int is noinit
+ fun run
do
_a1.output
do
_a1.output
- a2.output
+ _a2.output
end
end
- meth run_other(o: Foo)
+ fun run_other(o: Foo)
do
o._a1.output
o._a2.output
do
o._a1.output
o._a2.output
@@
-51,9
+51,9
@@
class Foo
end
class Bar
end
class Bar
-special Foo
- attr _a3: Int
- redef meth run
+ super Foo
+ var a3: Int is noinit
+ redef fun run
do
_a1.output
_a2.output
do
_a1.output
_a2.output
@@
-62,7
+62,7
@@
special Foo
init
do
init
do
- nop
+ if false then super # no auto super init call
#alt3#run
_a1 = 10
#alt4#run_other(self)
#alt3#run
_a1 = 10
#alt4#run_other(self)