mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
Fixed uncaught, invalid use of nesting introduced in rev [498]
This commit is contained in:
@@ -834,6 +834,12 @@ DValue* DtoNewClass(Loc loc, TypeClass* tc, NewExp* newexp)
|
||||
Logger::println("Resolving nested context");
|
||||
LOG_SCOPE;
|
||||
|
||||
if (gIR->func()->decl->isStatic())
|
||||
{
|
||||
gIR->func()->decl->error("is static and cannot access nested class %s", tc->sym->toChars());
|
||||
fatal();
|
||||
}
|
||||
|
||||
// get context
|
||||
LLValue* nest = DtoNestedContext(loc, tc->sym);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user