From e4ee8907cbd6b826cc4e83a4ebe63f98c76fb552 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 12 Sep 2008 12:48:16 +0200 Subject: [PATCH] Fix line number for error when trying to new a nested class without a context. --- gen/classes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/classes.cpp b/gen/classes.cpp index a742b00f..f5962fcc 100644 --- a/gen/classes.cpp +++ b/gen/classes.cpp @@ -836,7 +836,7 @@ DValue* DtoNewClass(Loc loc, TypeClass* tc, NewExp* newexp) if (gIR->func()->decl->isStatic()) { - gIR->func()->decl->error("is static and cannot access nested class %s", tc->sym->toChars()); + newexp->error("function %s is static and cannot access nested class %s", gIR->func()->decl->toPrettyChars(), tc->sym->toPrettyChars()); fatal(); }