update NOTICE and LICENSE
[nit.git] / tests / base_closure8.nit
index 9043945..ad72510 100644 (file)
 import kernel
 
 class A
-       meth foo(i: Int)
-               with bar
+       fun foo(i: Int)
+               !bar
        do
                '['.output
                i.output
-               bar with do
+               bar !break do
                        '!'.output
                        i.output
                end
+               #alt4#bar !baz do abort
                ']'.output
                i.output
        end
 end
 
-meth start
+fun maybe: Bool do return true
+
+fun start
 do
        var a = new A
        0.output
-       a.foo(1) with do 
+       a.foo(1) !bar do
                2.output
-               a.foo(3) with do
+               a.foo(3) !bar do
                        4.output
+                       if maybe then
                        #alt1#break
                        #alt2#continue
                        #alt3#return
+                       end
                        5.output
                end
                6.output