nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update NOTICE and LICENSE
[nit.git]
/
tests
/
base_virtual_type_self.nit
diff --git
a/tests/base_virtual_type_self.nit
b/tests/base_virtual_type_self.nit
index
f9803a6
..
964fc39
100644
(file)
--- a/
tests/base_virtual_type_self.nit
+++ b/
tests/base_virtual_type_self.nit
@@
-18,20
+18,20
@@
import kernel
class A[E]
type T: E
class A[E]
type T: E
- attr _t: T
- meth foo(t: T) do end
- meth foo2: T do return _t
- meth bar(t: A[T]) do end
- meth bar2: A[T] do return self
+ var _t: T
+ fun foo(t: T) do end
+ fun foo2: T do return _t
+ fun bar(t: A[T]) do end
+ fun bar2: A[T] do return self
init do end
end
class B
init do end
end
class B
-#alt3#special A[Int]
+ #alt3#super A[Int]
type U: Int
type U: Int
- meth test
+ fun test
do
#alt1#var a = new A[Int]
#alt2#var a = new A[U]
do
#alt1#var a = new A[Int]
#alt2#var a = new A[U]
@@
-39,7
+39,7
@@
class B
#alt4#var a = new A[A[Int]]
#alt5#var a = new A[A[U]]
#alt4#var a = new A[A[Int]]
#alt5#var a = new A[A[U]]
- var f: Float
+ var f: Float = 1.0
a.foo(f)
f = a.foo2
a.foo(f)
f = a.foo2