sepcomp: isset is implemented on tagged attributes
authorJean Privat <jean@pryen.org>
Mon, 23 Mar 2015 14:00:24 +0000 (21:00 +0700)
committerJean Privat <jean@pryen.org>
Mon, 23 Mar 2015 15:27:16 +0000 (22:27 +0700)
Signed-off-by: Jean Privat <jean@pryen.org>

src/compiler/separate_compiler.nit

index 15da8c1..424b849 100644 (file)
@@ -1580,7 +1580,7 @@ class SeparateCompilerVisitor
                        self.add("{res} = {recv}->attrs[{a.const_color}] != NULL; /* {a} on {recv.inspect}*/")
                else
 
-                       if not mtype.is_c_primitive then
+                       if not mtype.is_c_primitive and not mtype.is_tagged then
                                self.add("{res} = {recv}->attrs[{a.const_color}].val != NULL; /* {a} on {recv.inspect} */")
                        else
                                self.add("{res} = 1; /* NOT YET IMPLEMENTED: isset of primitives: {a} on {recv.inspect} */")