# HG changeset patch # User Tomas Lindquist Olsen # Date 1218640263 -7200 # Node ID 577211114d6d4a42dcd70e1c973572ad3e7ba8ad # Parent 7148a3f2b44b61fbf595b68676228192d3c9cb7d Fixed uncaught, invalid use of nesting introduced in rev [498] diff -r 7148a3f2b44b -r 577211114d6d gen/classes.cpp --- a/gen/classes.cpp Wed Aug 13 15:43:34 2008 +0200 +++ b/gen/classes.cpp Wed Aug 13 17:11:03 2008 +0200 @@ -834,6 +834,12 @@ 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);