nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tool: use ccache in gccx, if available
[nit.git]
/
tests
/
base_closure3.nit
diff --git
a/tests/base_closure3.nit
b/tests/base_closure3.nit
index
fae34bf
..
3910bae
100644
(file)
--- a/
tests/base_closure3.nit
+++ b/
tests/base_closure3.nit
@@
-17,8
+17,8
@@
import kernel
class A
import kernel
class A
- meth foo(i, j: Int)
- with bar(k, l: Int, a: A)
+ fun foo(i, j: Int)
+ !bar(k, l: Int, a: A)
do
i.output
bar(i+1, j-1, self)
do
i.output
bar(i+1, j-1, self)
@@
-27,19
+27,23
@@
class A
end
end
end
end
+fun maybe: Bool do return true
+
var a = new A
0.output
var a = new A
0.output
-a.foo(1,8) with x, y, b do #!alt2#
-#alt2#a.foo(1,8) with x, y do
+a.foo(1,8) !bar x, y, b do #!alt2#
+#alt2#a.foo(1,8) !bar x, y do
x.output
x.output
- b.foo(x+1, y-1) with z, t, c do
+ b.foo(x+1, y-1) !bar z, t, c do
z.output
z.output
+ if maybe then
#alt4#break
#alt5#break 'x'
#alt6#continue
#alt7#continue 'x'
#alt8#return
#alt9#return 'x'
#alt4#break
#alt5#break 'x'
#alt6#continue
#alt7#continue 'x'
#alt8#return
#alt9#return 'x'
+ end
t.output
end
y.output
t.output
end
y.output