short int var79 /* : Bool */;
int cltype;
int idtype;
+const char* var_class_name;
val* var_mtype1 /* var mtype1: MClassType */;
static val* varonce80;
val* var81 /* : String */;
var79 = var78->type->type_table[cltype] == idtype;
}
if (!var79) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "src/global_compiler.nit", 807);
+var_class_name = var78 == NULL ? "null" : var78->type->name;
+fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name);
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 807);
exit(1);
}
var_mtype1 = var78;
short int var7 /* : Bool */;
int cltype;
int idtype;
+const char* var_class_name;
val* var8 /* : AbstractCompiler */;
val* var9 /* : RapidTypeAnalysis */;
val* var10 /* : HashSet[MClassType] */;
var7 = var6->type->type_table[cltype] == idtype;
}
if (!var7) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "src/global_compiler.nit", 833);
+var_class_name = var6 == NULL ? "null" : var6->type->name;
+fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name);
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 833);
exit(1);
}
var_mtype = var6;
val* var1 /* : MClassType */;
var1 = self->attrs[COLOR_global_compiler__CustomizedRuntimeFunction___64drecv].val; /* @recv on <self:CustomizedRuntimeFunction> */
if (var1 == NULL) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Uninitialized attribute @recv", "src/global_compiler.nit", 869);
+fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @recv");
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 869);
exit(1);
}
var = var1;
int cltype;
int idtype;
const struct type* type_struct;
+const char* var_class_name;
val* var_compiler /* var compiler: GlobalCompiler */;
val* var1 /* : MClassType */;
val* var_recv /* var recv: MClassType */;
var = p0->type->type_table[cltype] == idtype;
}
if (!var) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "src/global_compiler.nit", 913);
+var_class_name = p0 == NULL ? "null" : p0->type->name;
+fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "COMPILER", var_class_name);
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 913);
exit(1);
}
var_compiler = p0;
}
var26 = ((val* (*)(val*))(var23->class->vft[COLOR_string__Object__to_s]))(var23) /* to_s on <var23:Array[Object]>*/;
((void (*)(val*, val*))(self->class->vft[COLOR_file__Object__print]))(self, var26) /* print on <self:CustomizedRuntimeFunction>*/;
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Aborted", "src/global_compiler.nit", 920);
+fprintf(stderr, "Runtime error: %s", "Aborted");
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 920);
exit(1);
} else {
}
var_comment = var41;
var42 = ((val* (*)(val*))(var_mmethoddef->class->vft[COLOR_model__MMethodDef__msignature]))(var_mmethoddef) /* msignature on <var_mmethoddef:MMethodDef>*/;
if (var42 == NULL) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Reciever is null", "src/global_compiler.nit", 934);
+fprintf(stderr, "Runtime error: %s", "Reciever is null");
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 934);
exit(1);
} else {
var43 = ((val* (*)(val*))(var42->class->vft[COLOR_model__MSignature__return_mtype]))(var42) /* return_mtype on <var42:nullable MSignature>*/;
var100 = 0;
var101 = ((val* (*)(val*))(var_mmethoddef->class->vft[COLOR_model__MMethodDef__msignature]))(var_mmethoddef) /* msignature on <var_mmethoddef:MMethodDef>*/;
if (var101 == NULL) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Reciever is null", "src/global_compiler.nit", 948);
+fprintf(stderr, "Runtime error: %s", "Reciever is null");
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 948);
exit(1);
} else {
var102 = ((long (*)(val*))(var101->class->vft[COLOR_model__MSignature__arity]))(var101) /* arity on <var101:nullable MSignature>*/;
var_i = var108;
var109 = ((val* (*)(val*))(var_mmethoddef->class->vft[COLOR_model__MMethodDef__msignature]))(var_mmethoddef) /* msignature on <var_mmethoddef:MMethodDef>*/;
if (var109 == NULL) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Reciever is null", "src/global_compiler.nit", 949);
+fprintf(stderr, "Runtime error: %s", "Reciever is null");
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 949);
exit(1);
} else {
var110 = ((val* (*)(val*))(var109->class->vft[COLOR_model__MSignature__mparameters]))(var109) /* mparameters on <var109:nullable MSignature>*/;
var_mtype = var112;
var113 = ((val* (*)(val*))(var_mmethoddef->class->vft[COLOR_model__MMethodDef__msignature]))(var_mmethoddef) /* msignature on <var_mmethoddef:MMethodDef>*/;
if (var113 == NULL) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Reciever is null", "src/global_compiler.nit", 950);
+fprintf(stderr, "Runtime error: %s", "Reciever is null");
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 950);
exit(1);
} else {
var114 = ((long (*)(val*))(var113->class->vft[COLOR_model__MSignature__vararg_rank]))(var113) /* vararg_rank on <var113:nullable MSignature>*/;
var237;
var238 = ((val* (*)(val*))(var_frame->class->vft[COLOR_abstract_compiler__Frame__returnlabel]))(var_frame) /* returnlabel on <var_frame:Frame>*/;
if (var238 == NULL) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "src/global_compiler.nit", 976);
+fprintf(stderr, "Runtime error: %s", "Cast failed");
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 976);
exit(1);
}
if (varonce239) {
}
var255 = ((val* (*)(val*))(var_frame->class->vft[COLOR_abstract_compiler__Frame__returnvar]))(var_frame) /* returnvar on <var_frame:Frame>*/;
if (var255 == NULL) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "src/global_compiler.nit", 978);
+fprintf(stderr, "Runtime error: %s", "Cast failed");
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 978);
exit(1);
}
if (varonce256) {
int cltype;
int idtype;
const struct type* type_struct;
+const char* var_class_name;
val* var_v /* var v: GlobalCompilerVisitor */;
val* var_arguments /* var arguments: Array[RuntimeVariable] */;
val* var2 /* : MMethodDef */;
var1 = p0->type->type_table[cltype] == idtype;
}
if (!var1) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "src/global_compiler.nit", 983);
+var_class_name = p0 == NULL ? "null" : p0->type->name;
+fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "VISITOR", var_class_name);
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 983);
exit(1);
}
var_v = p0;
var2 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_compiler__AbstractRuntimeFunction__mmethoddef]))(self) /* mmethoddef on <self:CustomizedRuntimeFunction>*/;
var3 = ((val* (*)(val*))(var2->class->vft[COLOR_model__MMethodDef__msignature]))(var2) /* msignature on <var2:MMethodDef>*/;
if (var3 == NULL) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Reciever is null", "src/global_compiler.nit", 985);
+fprintf(stderr, "Runtime error: %s", "Reciever is null");
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 985);
exit(1);
} else {
var4 = ((val* (*)(val*))(var3->class->vft[COLOR_model__MSignature__return_mtype]))(var3) /* return_mtype on <var3:nullable MSignature>*/;
var53;
var54 = ((val* (*)(val*))(var_frame->class->vft[COLOR_abstract_compiler__Frame__returnlabel]))(var_frame) /* returnlabel on <var_frame:Frame>*/;
if (var54 == NULL) {
-fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "src/global_compiler.nit", 1002);
+fprintf(stderr, "Runtime error: %s", "Cast failed");
+fprintf(stderr, " (%s:%d)\n", "src/global_compiler.nit", 1002);
exit(1);
}
if (varonce55) {