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_closure2.nit
diff --git
a/tests/base_closure2.nit
b/tests/base_closure2.nit
index
25c59f7
..
ac1e651
100644
(file)
--- a/
tests/base_closure2.nit
+++ b/
tests/base_closure2.nit
@@
-17,8
+17,8
@@
import kernel
class A
import kernel
class A
- meth foo
- with bar(i: Int)
+ fun foo
+ !bar(i: Int)
do
1.output
bar(2) #!alt1#
do
1.output
bar(2) #!alt1#
@@
-29,18
+29,22
@@
class A
end
end
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 x do #!alt11#
- #alt11#a.foo with do
+ a.foo !bar x do #!alt11#
+ #alt11#a.foo !bar do
x.output
x.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
(x+1).output
end
#alt10# a.foo
(x+1).output
end
#alt10# a.foo