Move check for access of context for nested class from backend into frontend.

This commit is contained in:
Christian Kamm 2008-10-02 23:12:19 +02:00
parent e2a1394ae8
commit b3d4bc83f8
4 changed files with 27 additions and 7 deletions

View file

@ -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);