update NOTICE and LICENSE
[nit.git] / tests / base_closure2.nit
index 25c59f7..ac1e651 100644 (file)
@@ -17,8 +17,8 @@
 import kernel
 
 class A
-       meth foo
-               with bar(i: Int)
+       fun foo
+               !bar(i: Int)
        do
                1.output
                bar(2) #!alt1#
@@ -29,18 +29,22 @@ class A
        end
 end
 
-meth work
+fun maybe: Bool do return true
+
+fun work
 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
+               if maybe then
                #alt4#break
                #alt5#break 'x'
                #alt6#continue
                #alt7#continue 'x'
                #alt8#return
                #alt9#return 'x'
+               end
                (x+1).output
        end
        #alt10# a.foo