Do not crash if a constructor is not found.
authorJean Privat <jean@pryen.org>
Sat, 27 Dec 2008 14:05:05 +0000 (09:05 -0500)
committerJean Privat <jean@pryen.org>
Sat, 27 Dec 2008 14:05:05 +0000 (09:05 -0500)
src/syntax/typing.nit

index afd0da7..8c4e011 100644 (file)
@@ -912,6 +912,8 @@ special AAbsSendExpr
                end
 
                do_typing(v, t, false, false, name, n_args.to_a)
+               if prop == null then return
+
                if not prop.global.is_init then
                        v.error(self, "Error: {prop} is not a constructor.")
                end