nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: change identifier enum to values
[nit.git]
/
tests
/
base_closure8.nit
diff --git
a/tests/base_closure8.nit
b/tests/base_closure8.nit
index
9043945
..
ad72510
100644
(file)
--- a/
tests/base_closure8.nit
+++ b/
tests/base_closure8.nit
@@
-17,31
+17,36
@@
import kernel
class A
import kernel
class A
- meth foo(i: Int)
- with bar
+ fun foo(i: Int)
+ !bar
do
'['.output
i.output
do
'['.output
i.output
- bar with do
+ bar !break do
'!'.output
i.output
end
'!'.output
i.output
end
+ #alt4#bar !baz do abort
']'.output
i.output
end
end
']'.output
i.output
end
end
-meth start
+fun maybe: Bool do return true
+
+fun start
do
var a = new A
0.output
do
var a = new A
0.output
- a.foo(1) with do
+ a.foo(1) !bar do
2.output
2.output
- a.foo(3) with do
+ a.foo(3) !bar do
4.output
4.output
+ if maybe then
#alt1#break
#alt2#continue
#alt3#return
#alt1#break
#alt2#continue
#alt3#return
+ end
5.output
end
6.output
5.output
end
6.output