mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 08:30:47 +03:00
DMD Issue 4269 - Regression(2.031): invalid type accepted if evaluated while errors are gagged
This commit is contained in:
parent
cd516373b0
commit
adebe4c732
2 changed files with 32 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/* ================================================================== */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue