nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
version: v0.4.1-git
[nit.git]
/
tests
/
base_closure_default4.nit
diff --git
a/tests/base_closure_default4.nit
b/tests/base_closure_default4.nit
index
8f12ae9
..
cd4f409
100644
(file)
--- a/
tests/base_closure_default4.nit
+++ b/
tests/base_closure_default4.nit
@@
-18,11
+18,15
@@
import kernel
class A
fun foo
class A
fun foo
- with bar(i: Int): Int do
+ !bar(i: Int): Int do
+ if maybe then
#alt1# return
#alt2# return -1
#alt3# abort
#alt4# continue
#alt1# return
#alt2# return -1
#alt3# abort
#alt4# continue
+ #alt6# break
+ #alt7# break 1
+ end
continue (i * 10) #!alt5#
end
do
continue (i * 10) #!alt5#
end
do
@@
-32,9
+36,11
@@
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 with j do continue j
+a.foo !bar j do continue j
0.output
a.foo
0.output
0.output
a.foo
0.output