syntax: fix OR if_false_var_ctx passing.
authorJean Privat <jean@pryen.org>
Mon, 22 Jun 2009 20:05:00 +0000 (16:05 -0400)
committerJean Privat <jean@pryen.org>
Wed, 24 Jun 2009 19:48:18 +0000 (15:48 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/syntax/typing.nit
tests/base_isa_cast3.nit
tests/sav/base_isa_cast3.sav
tests/sav/base_isa_cast3_alt9.sav [new file with mode: 0644]

index 5525907..421b433 100644 (file)
@@ -696,7 +696,7 @@ redef class ABoolExpr
 end
 
 redef class AOrExpr
-       redef meth after_typing(v)
+       redef meth accept_typing(v)
        do
                var old_var_ctx = v.variable_ctx
 
index e4c6f62..2f80084 100644 (file)
@@ -19,10 +19,10 @@ import kernel
 class A
        init do end
 end
-
 class B
 special A
        meth foo(i: Int) do i.output
+       meth bar: Bool do return true
        init do end
 end
 
@@ -56,5 +56,17 @@ else
 end
 #alt8#a.foo(-8)
 
+if a isa B and a.bar then
+       a.foo(4)
+end
+
+if not a isa B or not a.bar then
+       #alt9# a.foo(-9)
+else
+       a.foo(5)
+end
 
+if not (not a isa B or not a.bar) then
+       a.foo(6)
+end
 
diff --git a/tests/sav/base_isa_cast3_alt9.sav b/tests/sav/base_isa_cast3_alt9.sav
new file mode 100644 (file)
index 0000000..3f3996f
--- /dev/null
@@ -0,0 +1 @@
+alt/base_isa_cast3_alt9.nit:64,3--10: Error: Method 'foo' doesn't exists in A.