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_closure4.nit
diff --git
a/tests/base_closure4.nit
b/tests/base_closure4.nit
index
4d13fe8
..
489b1e8
100644
(file)
--- a/
tests/base_closure4.nit
+++ b/
tests/base_closure4.nit
@@
-18,7
+18,7
@@
import kernel
class A
fun foo
class A
fun foo
- with bar: Int
+ !bar: Int
do
1.output
bar.output #!alt1#
do
1.output
bar.output #!alt1#
@@
-28,18
+28,22
@@
class A
end
end
end
end
+fun maybe: Bool do return true
+
fun work
do
var a = new A
fun work
do
var a = new A
- a.foo with do #!alt11#
- #alt11#a.foo with x do
+ a.foo !bar do #!alt11#
+ #alt11#a.foo !bar x do
2.output
2.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
continue 3
end
#alt10# a.foo
continue 3
end
#alt10# a.foo