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_closure1.nit
diff --git
a/tests/base_closure1.nit
b/tests/base_closure1.nit
index
6995966
..
fc33d3a
100644
(file)
--- a/
tests/base_closure1.nit
+++ b/
tests/base_closure1.nit
@@
-17,8
+17,8
@@
import kernel
class A
import kernel
class A
- meth foo
- with bar
+ fun foo
+ !bar
do
1.output
bar #!alt1#
do
1.output
bar #!alt1#
@@
-28,21
+28,26
@@
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 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
end
#alt10# a.foo
3.output
end
#alt10# a.foo
+ #alt12# a.foo !baz do (-1).output
5.output
end
5.output
end