lib: fix precision of test_curl
[nit.git] / tests / base_closure2.nit
index 25c59f7..821d2ad 100644 (file)
 import kernel
 
 class A
-       meth foo
-               with bar(i: Int)
+       fun foo
+               !bar(i: Int)
        do
                1.output
-               bar(2) #!alt1#
+               bar(2) #alt1#
                #alt2#bar
                #alt12#bar('x')
                #alt3#var x = bar(2)
@@ -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