update NOTICE and LICENSE
[nit.git] / tests / base_closure5.nit
index bef65e9..5b68ff2 100644 (file)
@@ -17,8 +17,8 @@
 import kernel
 
 class A
-       meth foo: Int
-               with bar: Int
+       fun foo: Int
+               !bar: Int
        do
                1.output
                var r = bar
@@ -27,11 +27,14 @@ class A
        end
 end
 
-meth work: Int
+fun maybe: Bool do return true
+
+fun work: Int
 do
        var a = new A
-       var i = a.foo with do
+       var i = a.foo !bar do
                2.output
+               if maybe then
                #alt1#break
                #alt2#break 'x'
                #alt3#break 100
@@ -40,6 +43,7 @@ do
                #alt6#return 200
                #alt7#continue
                #alt8#continue 'x'
+               end
                continue 5 #!alt9#
        end
        4.output