mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-14 07:09:50 +03:00
Move check for access of context for nested class from backend into frontend.
This commit is contained in:
parent
e2a1394ae8
commit
b3d4bc83f8
4 changed files with 27 additions and 7 deletions
|
@ -842,12 +842,6 @@ DValue* DtoNewClass(Loc loc, TypeClass* tc, NewExp* newexp)
|
|||
Logger::println("Resolving nested context");
|
||||
LOG_SCOPE;
|
||||
|
||||
if (gIR->func()->decl->isStatic())
|
||||
{
|
||||
newexp->error("function %s is static and cannot access nested class %s", gIR->func()->decl->toPrettyChars(), tc->sym->toPrettyChars());
|
||||
fatal();
|
||||
}
|
||||
|
||||
// get context
|
||||
LLValue* nest = DtoNestedContext(loc, tc->sym);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue