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_closure_default1.nit
diff --git
a/tests/base_closure_default1.nit
b/tests/base_closure_default1.nit
index
0b34ab2
..
ffe3698
100644
(file)
--- a/
tests/base_closure_default1.nit
+++ b/
tests/base_closure_default1.nit
@@
-18,12
+18,16
@@
import kernel
class A
fun foo
class A
fun foo
- with bar do
+ !bar do
+ if maybe then
#alt1# return
#alt2# return 1
#alt3# abort
#alt4# continue
#alt5# continue 20
#alt1# return
#alt2# return 1
#alt3# abort
#alt4# continue
#alt5# continue 20
+ #alt6# break
+ #alt7# break 1
+ end
20.output
end
do
20.output
end
do
@@
-33,9
+37,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 do 2.output
+a.foo !bar do 2.output
0.output
a.foo
0.output
0.output
a.foo
0.output