nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: Pattern is an interface
[nit.git]
/
tests
/
base_closure_break.nit
diff --git
a/tests/base_closure_break.nit
b/tests/base_closure_break.nit
index
814cf7a
..
8d8c3f6
100644
(file)
--- a/
tests/base_closure_break.nit
+++ b/
tests/base_closure_break.nit
@@
-17,30
+17,34
@@
import kernel
class A
import kernel
class A
- meth foo
- with break bar #!alt12#
- #alt12#with break bar: Int
+ fun foo
+ break !bar #!alt12#
+ #alt12#break !bar: Int
do
1.output
do
1.output
- bar #!alt1#
- #alt2#bar(2)
- #alt3#var x = bar
+ if maybe then bar #!alt1#
+ #alt2#if maybe then bar(2)
+ #alt3#if maybe then var x = bar
4.output
end
end
4.output
end
end
-meth work
+fun maybe: Bool do return true
+
+fun work
do
var a = new A
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
3.output
break #!alt13#
end
3.output
break #!alt13#
end