update NOTICE and LICENSE
[nit.git] / tests / base_closure6.nit
index 48e99cc..f9ecb67 100644 (file)
@@ -17,8 +17,8 @@
 import kernel
 
 class A
-       meth foo: U
-               with bar
+       fun foo: U
+               !bar
        do
                return new U
        end
@@ -28,18 +28,20 @@ class T
 end
 
 class U
-special T
+       super T
 end
 
 class V
-special T
+       super T
 end
 
 class W
-special U
-special V
+       super U
+       super V
 end
 
+fun maybe: Bool do return true
+
 var a = new A
 
 var t: T = new T
@@ -47,21 +49,30 @@ var u: U = new U
 var v: V = new V
 var w: W = new W
 
-var y: Object
+var y: Object#!alt1#
 #alt1#var y: U
-y = a.foo with do 0.output
-y = a.foo with do break t
-y = a.foo with do break u
-y = a.foo with do break v
-y = a.foo with do break w
-y = a.foo with do
+y = a.foo !bar do 0.output
+y = a.foo !bar do break t
+y = a.foo !bar do break u
+y = a.foo !bar do break v
+y = a.foo !bar do break w
+y = a.foo !bar do
+       if maybe then
        break t
+       else if maybe then
        break u
+       else if maybe then
        break v
+       else if maybe then
        break w
+       end
 end
-y = a.foo with do
+y = a.foo !bar do
+       if maybe then
        break u
+       else if maybe then
        break v
+       else if maybe then
        break w
+       end
 end