Mercurial > projects > ldc
comparison gen/classes.cpp @ 589:7690d7065fa8
Fix line number for error when trying to new a nested class without a context.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Fri, 12 Sep 2008 12:48:16 +0200 |
parents | 577211114d6d |
children | c9aa338280ed |
comparison
equal
deleted
inserted
replaced
588:870652a9af23 | 589:7690d7065fa8 |
---|---|
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()) | 837 if (gIR->func()->decl->isStatic()) |
838 { | 838 { |
839 gIR->func()->decl->error("is static and cannot access nested class %s", tc->sym->toChars()); | 839 newexp->error("function %s is static and cannot access nested class %s", gIR->func()->decl->toPrettyChars(), tc->sym->toPrettyChars()); |
840 fatal(); | 840 fatal(); |
841 } | 841 } |
842 | 842 |
843 // get context | 843 // get context |
844 LLValue* nest = DtoNestedContext(loc, tc->sym); | 844 LLValue* nest = DtoNestedContext(loc, tc->sym); |