update NOTICE and LICENSE
[nit.git] / tests / base_label_closure.nit
index 20bc3f9..f81c010 100644 (file)
 import kernel
 
 fun foo
-       with bar
+       !bar
 do
-       bar with do 'X'.output
+       bar !break do 'X'.output
 end
 
+fun maybe: Bool do return true
+
 1.output
-foo with do
+foo !bar do
        2.output
-       foo with do
+       foo !bar do
                3.output
-               foo with do end label l3
+               foo !bar do end label l3
+               if maybe then
                #alt1#break label l2
                #alt2#break label l3
                #alt3#break label l4
                #alt4#break
                #alt5#continue label l1
-               break label l1
+               end
+               if maybe then break label l1
                4.output
        end label l2#!alt6#
        #alt6#end label l1
@@ -41,4 +45,4 @@ foo with do
 end label l1
 6.output
 
-#alt7#foo with do end label l1
+#alt7#foo !bar do end label l1