From feebe880bc929301da514e53276ab0b1cabfcc83 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Fri, 22 Apr 2011 18:45:37 +0200 Subject: [PATCH] Merged DMD commit 1a61d2c8de2fe913bc6cbc45a5bce8f86a88d1aa: bugzilla 5182 ICE(expression.c): calling unittest from a function --- dmd/expression.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dmd/expression.c b/dmd/expression.c index edfd5d90..326e72e7 100644 --- a/dmd/expression.c +++ b/dmd/expression.c @@ -2195,6 +2195,11 @@ Lagain: if (!f->originalType && f->scope) // semantic not yet run f->semantic(f->scope); + if (f->isUnitTestDeclaration()) + { + error("cannot call unittest function %s", toChars()); + return new ErrorExp(); + } if (!f->type->deco) { error("forward reference to %s", toChars());