nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
docker: add a Dockerfile example
[nit.git]
/
tests
/
base_attr_isset.nit
diff --git
a/tests/base_attr_isset.nit
b/tests/base_attr_isset.nit
index
f3a1178
..
c1a1fea
100644
(file)
--- a/
tests/base_attr_isset.nit
+++ b/
tests/base_attr_isset.nit
@@
-29,14
+29,14
@@
enum Bool
end
class Integer
end
class Integer
- var _val: Int
- init(val: Int) do _val = val
+ var val: Int
+
fun output do _val.output
end
class Foo
fun output do _val.output
end
class Foo
- var _a1: Integer
- var _a2: Integer
+ var a1: Integer is noinit
+ var a2: Integer is noinit
fun run
do
_a1.output
fun run
do
_a1.output
@@
-64,9
+64,9
@@
end
class Bar
super Foo
class Bar
super Foo
- var _a3: Integer#alt1# #alt2#
- #alt1#var _a3: Integer = new Integer(9000)
- #alt2#var _a3: nullable Integer
+ 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
redef fun run
do
_a1.output
@@
-82,7
+82,7
@@
class Bar
init
do
init
do
- nop
+ if false then super # no auto super init call
show(4)
_a1 = new Integer(10)
show(5)
show(4)
_a1 = new Integer(10)
show(5)