nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update NOTICE and LICENSE
[nit.git]
/
tests
/
base_closure5.nit
diff --git
a/tests/base_closure5.nit
b/tests/base_closure5.nit
index
1cce7b4
..
5b68ff2
100644
(file)
--- a/
tests/base_closure5.nit
+++ b/
tests/base_closure5.nit
@@
-18,7
+18,7
@@
import kernel
class A
fun foo: Int
class A
fun foo: Int
- with bar: 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
+fun maybe: Bool do return true
+
fun work: Int
do
var a = new A
fun work: Int
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