mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +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*)
|
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)
|
if (members && symtab)
|
||||||
DtoResolveDsymbol(this);
|
DtoResolveDsymbol(this);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +50,11 @@ void InterfaceDeclaration::codegen(Ir*)
|
||||||
|
|
||||||
void StructDeclaration::codegen(Ir*)
|
void StructDeclaration::codegen(Ir*)
|
||||||
{
|
{
|
||||||
|
if (type->ty == Terror)
|
||||||
|
{ error("had semantic errors when compiling");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (members && symtab)
|
if (members && symtab)
|
||||||
DtoResolveDsymbol(this);
|
DtoResolveDsymbol(this);
|
||||||
}
|
}
|
||||||
|
@ -54,6 +63,11 @@ void StructDeclaration::codegen(Ir*)
|
||||||
|
|
||||||
void ClassDeclaration::codegen(Ir*)
|
void ClassDeclaration::codegen(Ir*)
|
||||||
{
|
{
|
||||||
|
if (type->ty == Terror)
|
||||||
|
{ error("had semantic errors when compiling");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (members && symtab)
|
if (members && symtab)
|
||||||
DtoResolveDsymbol(this);
|
DtoResolveDsymbol(this);
|
||||||
}
|
}
|
||||||
|
@ -86,6 +100,11 @@ void VarDeclaration::codegen(Ir* p)
|
||||||
Logger::print("VarDeclaration::toObjFile(): %s | %s\n", toChars(), type->toChars());
|
Logger::print("VarDeclaration::toObjFile(): %s | %s\n", toChars(), type->toChars());
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
|
if (type->ty == Terror)
|
||||||
|
{ error("had semantic errors when compiling");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// just forward aliases
|
// just forward aliases
|
||||||
if (aliassym)
|
if (aliassym)
|
||||||
{
|
{
|
||||||
|
@ -187,6 +206,11 @@ void TypedefDeclaration::codegen(Ir*)
|
||||||
Logger::print("TypedefDeclaration::toObjFile: %s\n", toChars());
|
Logger::print("TypedefDeclaration::toObjFile: %s\n", toChars());
|
||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
|
if (type->ty == Terror)
|
||||||
|
{ error("had semantic errors when compiling");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// generate typeinfo
|
// generate typeinfo
|
||||||
DtoTypeInfoOf(type, false);
|
DtoTypeInfoOf(type, false);
|
||||||
}
|
}
|
||||||
|
@ -196,6 +220,11 @@ void TypedefDeclaration::codegen(Ir*)
|
||||||
void EnumDeclaration::codegen(Ir*)
|
void EnumDeclaration::codegen(Ir*)
|
||||||
{
|
{
|
||||||
Logger::println("Ignoring EnumDeclaration::toObjFile for %s", toChars());
|
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);
|
DtoResolveTypeInfo(fd);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
error(dsym->loc, "unsupported dsymbol: %s", dsym->toChars());
|
error(dsym->loc, "unsupported dsymbol: %s", dsym->toChars());
|
||||||
assert(0 && "unsupported dsymbol for DtoResolveDsymbol");
|
assert(0 && "unsupported dsymbol for DtoResolveDsymbol");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue