mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
Fix line number for error when trying to new a nested class without a context.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user