From 55315f59ef1231e92fb4d1454077d23cfad850e7 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Fri, 22 Apr 2011 14:57:14 +0200 Subject: [PATCH] Merged DMD commit 1e391e49c2d8ec6fa3aaa9d273efad201b757302: bugzilla 4938 Regression(2.047) dmd segfault when compiling --- dmd/statement.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dmd/statement.c b/dmd/statement.c index 95693022..9cc4cba7 100644 --- a/dmd/statement.c +++ b/dmd/statement.c @@ -4119,7 +4119,12 @@ void Catch::semantic(Scope *sc) type = new TypeIdentifier(0, Id::Object); type = type->semantic(loc, sc); if (!type->toBasetype()->isClassHandle()) - error(loc, "can only catch class objects, not '%s'", type->toChars()); + { + if (type != Type::terror) + { error(loc, "can only catch class objects, not '%s'", type->toChars()); + type = Type::terror; + } + } else if (ident) { var = new VarDeclaration(loc, type, ident, NULL);