update NOTICE and LICENSE
[nit.git] / tests / base_closure_default2.nit
index 30b5f29..dd43e5d 100644 (file)
 import kernel
 
 class A
-       meth foo
-               with bar(i: Int) do
+       fun foo
+               !bar(i: Int) do
+                       if maybe then
                        #alt1# return
                        #alt2# return 1
                        #alt3# abort
                        #alt4# continue
                        #alt5# continue 20
+                       #alt7# break
+                       #alt8# break 1
+                       end
                        (i * 10).output
                end
        do
@@ -34,9 +38,11 @@ class A
        end
 end
 
+fun maybe: Bool do return true
+
 var a = new A
 0.output
-a.foo with j do j.output
+a.foo !bar j do j.output
 0.output
 a.foo
 0.output