From: Jean Privat Date: Fri, 28 Feb 2014 13:59:03 +0000 (-0500) Subject: nitg-s: use the original type in type tests X-Git-Tag: v0.6.5~59^2~4 X-Git-Url: http://nitlanguage.org nitg-s: use the original type in type tests RTA discovers original types, thus do not try to un-nullify some. Signed-off-by: Jean Privat --- diff --git a/src/separate_compiler.nit b/src/separate_compiler.nit index 15f9e03..54f45c8 100644 --- a/src/separate_compiler.nit +++ b/src/separate_compiler.nit @@ -1349,13 +1349,13 @@ class SeparateCompilerVisitor self.add_decl("const struct type* {type_struct};") # Either with resolution_table with a direct resolution - hardening_live_open_type(ntype) - link_unresolved_type(self.frame.mpropdef.mclassdef, ntype) - self.require_declaration(ntype.const_color) + hardening_live_open_type(mtype) + link_unresolved_type(self.frame.mpropdef.mclassdef, mtype) + self.require_declaration(mtype.const_color) if compiler.modelbuilder.toolcontext.opt_phmod_typing.value or compiler.modelbuilder.toolcontext.opt_phand_typing.value then - self.add("{type_struct} = {recv_type_info}->resolution_table->types[HASH({recv_type_info}->resolution_table->mask, {ntype.const_color})];") + self.add("{type_struct} = {recv_type_info}->resolution_table->types[HASH({recv_type_info}->resolution_table->mask, {mtype.const_color})];") else - self.add("{type_struct} = {recv_type_info}->resolution_table->types[{ntype.const_color}];") + self.add("{type_struct} = {recv_type_info}->resolution_table->types[{mtype.const_color}];") end if compiler.modelbuilder.toolcontext.opt_typing_test_metrics.value then self.compiler.count_type_test_unresolved[tag] += 1