changeset 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 7148a3f2b44b
children 841589c97f20
files gen/classes.cpp
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);