nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vim autocomplete: rename `write_to_stream` to `write_doc` with more arguments
[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
7d2633c
..
cf1dbd9
100644
(file)
--- a/
tests/base_virtual_type_self.nit
+++ b/
tests/base_virtual_type_self.nit
@@
-18,17
+18,17
@@
import kernel
class A[E]
type T: E
class A[E]
type T: E
- var _t: T
+ var t: T is noinit
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
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
end
class B
-#alt3#special A[Int]
+ #alt3#super A[Int]
type U: Int
fun test
type U: Int
fun test
@@
-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