From 5f9534da77216aa52af6bfb30b2cb25b543e2026 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Sun, 4 Jan 2015 16:39:28 -0500 Subject: [PATCH] typing: reject literal arrays made of `null` (because they are untypable) Signed-off-by: Jean Privat --- src/semantize/typing.nit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/semantize/typing.nit b/src/semantize/typing.nit index 1dfaec6..9d24a21 100644 --- a/src/semantize/typing.nit +++ b/src/semantize/typing.nit @@ -1243,7 +1243,7 @@ redef class AArrayExpr if mtype == null then mtype = v.merge_types(self, mtypes) end - if mtype == null then + if mtype == null or mtype isa MNullType then v.error(self, "Type Error: ambiguous array type {mtypes.join(" ")}") return end -- 1.7.9.5