http://d.puremagic.com/issues/show_bug.cgi?id=3316
Don <clugd...@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch --- Comment #1 from Don <clugd...@yahoo.com.au> 2009-09-29 23:56:55 PDT --- This is happening because the nested template is being marked as pure. This happens in mtype.c, in TypeFunction::semantic, line 4038: the template function gets marked as pure/nothrow because it's taken from the parent scope. This is wrong, because pure/nothrow shouldn't be inherited by members. PATCH: In DeclarationExp::semantic(Scope *sc), pure (and nothrow) should not be passed on to members. Turn it off while running semantic on those functions. Index: expression.c =================================================================== --- expression.c (revision 196) +++ expression.c (working copy) \@@ -4505,8 +4505,12 @@ } if (!s->isVarDeclaration()) { + // 'pure nothrow' is not inherited by member declarations + int scopePureNothrow = sc->stc & (STCpure | STCnothrow); + sc->stc ^= scopePureNothrow; declaration->semantic(sc); s->parent = sc->parent; + sc->stc ^= scopePureNothrow; } if (!global.errors) { -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------