mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-18 01:39:03 +02: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())
|
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();
|
fatal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user