Fix line number for error when trying to new a nested class without a context.

This commit is contained in:
Christian Kamm
2008-09-12 12:48:16 +02:00
parent f0abdf860a
commit e4ee8907cb

View File

@@ -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();
}