mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 16:41:06 +03:00
Fixed uncaught, invalid use of nesting introduced in rev [498]
This commit is contained in:
parent
aae027961c
commit
7ffb43fdc6
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue