Merged DMD commit c7f94c6b66d3b4233ea01dd3dd9f0028b7118870:

5391 Crash with recursive alias declaration

When a recursive alias declaration is encountered, mark it as
type error (not just as an alias to itself of type error).
This commit is contained in:
David Nadlinger
2011-04-23 18:29:18 +02:00
parent d7eead617e
commit 907067c4e8

View File

@@ -620,6 +620,7 @@ Dsymbol *AliasDeclaration::toAlias()
if (inSemantic)
{ error("recursive alias declaration");
aliassym = new TypedefDeclaration(loc, ident, Type::terror, NULL);
type = Type::terror;
}
else if (!aliassym && scope)
semantic(scope);