niti: use PrimitiveInstance for `null_instance`
authorJean Privat <jean@pryen.org>
Fri, 5 Dec 2014 20:53:47 +0000 (15:53 -0500)
committerJean Privat <jean@pryen.org>
Sat, 6 Dec 2014 05:42:16 +0000 (00:42 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/interpreter/naive_interpreter.nit

index f7f23a2..144788d 100644 (file)
@@ -75,7 +75,7 @@ class NaiveInterpreter
                init_instance_primitive(self.true_instance)
                self.false_instance = new PrimitiveInstance[Bool](mainmodule.bool_type, false)
                init_instance_primitive(self.false_instance)
-               self.null_instance = new MutableInstance(mainmodule.model.null_type)
+               self.null_instance = new PrimitiveInstance[nullable Object](mainmodule.model.null_type, null)
        end
 
        # Starts the interpreter on the main module of a program