nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: Intro of nitrestful a RESTful API generator
[nit.git]
/
tests
/
test_boxing.nit
diff --git
a/tests/test_boxing.nit
b/tests/test_boxing.nit
index
6501016
..
247c591
100644
(file)
--- a/
tests/test_boxing.nit
+++ b/
tests/test_boxing.nit
@@
-18,25
+18,26
@@
# By Flop
class Gene[T]
# By Flop
class Gene[T]
- readable attr _a_ : T
- meth a: T
+ var a_ : T
+ fun a: T
do
do
- return _a_
+ return a_
end
end
- init do end
+ init(a:T) do a_ = a
end
end
-class GeneBool special Gene[Bool]
- meth a=(b: Bool)
+class GeneBool
+ super Gene[Bool]
+ fun a=(b: Bool)
do
do
- _a_ = b
+ a_ = b
end
end
- init do end
+ init(a) do super(a)
end
end
-var x = new Gene[Bool]
-var g = new GeneBool
+var x = new Gene[Bool](false)
+var g = new GeneBool(false)
g.a = true
print(g.a)
g.a = true
print(g.a)