From 907067c4e8860177bc22d715dbc3a857a5b76803 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sat, 23 Apr 2011 18:29:18 +0200 Subject: [PATCH] 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). --- dmd/declaration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dmd/declaration.c b/dmd/declaration.c index 76abbe03..d39f1cec 100644 --- a/dmd/declaration.c +++ b/dmd/declaration.c @@ -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);