mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 19:06:02 +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");
|
Logger::println("Resolving nested context");
|
||||||
LOG_SCOPE;
|
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
|
// get context
|
||||||
LLValue* nest = DtoNestedContext(loc, tc->sym);
|
LLValue* nest = DtoNestedContext(loc, tc->sym);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue