comparison gen/classes.cpp @ 504:577211114d6d

Fixed uncaught, invalid use of nesting introduced in rev [498]
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Wed, 13 Aug 2008 17:11:03 +0200
parents a34078905d01
children 7690d7065fa8
comparison
equal deleted inserted replaced
503:7148a3f2b44b 504:577211114d6d
832 else if (tc->sym->isNested() && tc->sym->vthis) 832 else if (tc->sym->isNested() && tc->sym->vthis)
833 { 833 {
834 Logger::println("Resolving nested context"); 834 Logger::println("Resolving nested context");
835 LOG_SCOPE; 835 LOG_SCOPE;
836 836
837 if (gIR->func()->decl->isStatic())
838 {
839 gIR->func()->decl->error("is static and cannot access nested class %s", tc->sym->toChars());
840 fatal();
841 }
842
837 // get context 843 // get context
838 LLValue* nest = DtoNestedContext(loc, tc->sym); 844 LLValue* nest = DtoNestedContext(loc, tc->sym);
839 845
840 // store into right location 846 // store into right location
841 size_t idx = 2 + tc->sym->vthis->ir.irField->index; 847 size_t idx = 2 + tc->sym->vthis->ir.irField->index;