mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
DMD Issue 4269 - Regression(2.031): invalid type accepted if evaluated while errors are gagged
This commit is contained in:
@@ -37,7 +37,11 @@ void Declaration::codegen(Ir*)
|
||||
|
||||
void InterfaceDeclaration::codegen(Ir*)
|
||||
{
|
||||
//Logger::println("Ignoring InterfaceDeclaration::toObjFile for %s", toChars());
|
||||
if (type->ty == Terror)
|
||||
{ error("had semantic errors when compiling");
|
||||
return;
|
||||
}
|
||||
|
||||
if (members && symtab)
|
||||
DtoResolveDsymbol(this);
|
||||
}
|
||||
@@ -46,6 +50,11 @@ void InterfaceDeclaration::codegen(Ir*)
|
||||
|
||||
void StructDeclaration::codegen(Ir*)
|
||||
{
|
||||
if (type->ty == Terror)
|
||||
{ error("had semantic errors when compiling");
|
||||
return;
|
||||
}
|
||||
|
||||
if (members && symtab)
|
||||
DtoResolveDsymbol(this);
|
||||
}
|
||||
@@ -54,6 +63,11 @@ void StructDeclaration::codegen(Ir*)
|
||||
|
||||
void ClassDeclaration::codegen(Ir*)
|
||||
{
|
||||
if (type->ty == Terror)
|
||||
{ error("had semantic errors when compiling");
|
||||
return;
|
||||
}
|
||||
|
||||
if (members && symtab)
|
||||
DtoResolveDsymbol(this);
|
||||
}
|
||||
@@ -86,6 +100,11 @@ void VarDeclaration::codegen(Ir* p)
|
||||
Logger::print("VarDeclaration::toObjFile(): %s | %s\n", toChars(), type->toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
if (type->ty == Terror)
|
||||
{ error("had semantic errors when compiling");
|
||||
return;
|
||||
}
|
||||
|
||||
// just forward aliases
|
||||
if (aliassym)
|
||||
{
|
||||
@@ -187,6 +206,11 @@ void TypedefDeclaration::codegen(Ir*)
|
||||
Logger::print("TypedefDeclaration::toObjFile: %s\n", toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
if (type->ty == Terror)
|
||||
{ error("had semantic errors when compiling");
|
||||
return;
|
||||
}
|
||||
|
||||
// generate typeinfo
|
||||
DtoTypeInfoOf(type, false);
|
||||
}
|
||||
@@ -196,6 +220,11 @@ void TypedefDeclaration::codegen(Ir*)
|
||||
void EnumDeclaration::codegen(Ir*)
|
||||
{
|
||||
Logger::println("Ignoring EnumDeclaration::toObjFile for %s", toChars());
|
||||
|
||||
if (type->ty == Terror)
|
||||
{ error("had semantic errors when compiling");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* ================================================================== */
|
||||
|
||||
@@ -912,8 +912,8 @@ void DtoResolveDsymbol(Dsymbol* dsym)
|
||||
DtoResolveTypeInfo(fd);
|
||||
}
|
||||
else {
|
||||
error(dsym->loc, "unsupported dsymbol: %s", dsym->toChars());
|
||||
assert(0 && "unsupported dsymbol for DtoResolveDsymbol");
|
||||
error(dsym->loc, "unsupported dsymbol: %s", dsym->toChars());
|
||||
assert(0 && "unsupported dsymbol for DtoResolveDsymbol");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user