nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'll-and-gg-operators' into wip
[nit.git]
/
tests
/
base_closure5.nit
diff --git
a/tests/base_closure5.nit
b/tests/base_closure5.nit
index
bef65e9
..
5b68ff2
100644
(file)
--- a/
tests/base_closure5.nit
+++ b/
tests/base_closure5.nit
@@
-17,8
+17,8
@@
import kernel
class A
import kernel
class A
- meth foo: Int
- with bar: Int
+ fun foo: Int
+ !bar: Int
do
1.output
var r = bar
do
1.output
var r = bar
@@
-27,11
+27,14
@@
class A
end
end
end
end
-meth work: Int
+fun maybe: Bool do return true
+
+fun work: Int
do
var a = new A
do
var a = new A
- var i = a.foo with do
+ var i = a.foo !bar do
2.output
2.output
+ if maybe then
#alt1#break
#alt2#break 'x'
#alt3#break 100
#alt1#break
#alt2#break 'x'
#alt3#break 100
@@
-40,6
+43,7
@@
do
#alt6#return 200
#alt7#continue
#alt8#continue 'x'
#alt6#return 200
#alt7#continue
#alt8#continue 'x'
+ end
continue 5 #!alt9#
end
4.output
continue 5 #!alt9#
end
4.output