syntax: variable assignment can bypass cast
[nit.git] / tests / base_isa_cast2.nit
index 4bccc58..14de354 100644 (file)
@@ -25,7 +25,7 @@ special A
        meth foo(i: Int) do i.output
        init do end
 end
-
+var a0: A = new B
 var a: A = new B
 if a isa B then
        a.foo(1)
@@ -44,8 +44,8 @@ if not a isa B then
        assert a isa B
        a.foo(3)
 end
-#alt8#a.foo(4)
-
+a.foo(4)
+a = a0
 while a isa B do
        #alt8#a.foo(5)
        a = new A