nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stdlib/strings: Abstracted hash (breaks hash on Buffer temporarily)
[nit.git]
/
tests
/
test_meta.nit
diff --git
a/tests/test_meta.nit
b/tests/test_meta.nit
index
dd31e5c
..
b649f99
100644
(file)
--- a/
tests/test_meta.nit
+++ b/
tests/test_meta.nit
@@
-16,19
+16,19
@@
class A
class A
- meth foo
+ fun foo
do
printn("A")
end
do
printn("A")
end
- meth blup(a: Int)
+ fun blup(a: Int)
do
blup2(a, 1)
end
do
blup2(a, 1)
end
- meth blup2(a: Int, b : Int)
+ fun blup2(a: Int, b : Int)
do
printn(a+b)
end
do
printn(a+b)
end
- meth blop(a: Int, b: Int...)
+ fun blop(a: Int, b: Int...)
do
var i = b.iterator
while i.is_ok do
do
var i = b.iterator
while i.is_ok do
@@
-39,25
+39,25
@@
class A
end
class B
end
class B
-special A
- redef meth foo
+ super A
+ redef fun foo
do
printn("B")
end
end
class C
do
printn("B")
end
end
class C
-special A
- meth foo2
+ super A
+ fun foo2
do
printn("C")
end
end
class D
do
printn("C")
end
end
class D
-special B
-special C
- redef meth foo
+ super B
+ super C
+ redef fun foo
do
printn("D")
end
do
printn("D")
end
@@
-65,7
+65,7
@@
special C
init do end
end
init do end
end
-meth test1
+fun test1
do
var b: B
b = new D
do
var b: B
b = new D
@@
-74,7
+74,7
@@
do
b.blup(3)
end
b.blup(3)
end
-meth test2
+fun test2
do
var b = new D
var a = [1,2,3]
do
var b = new D
var a = [1,2,3]