Don't resolve template instances that were instantiated inside static if or statis assert

This commit is contained in:
Alexey Prokhin
2012-02-14 15:17:59 +04:00
parent 1f4cd033ca
commit bb0d51fb98
8 changed files with 20 additions and 3 deletions

View File

@@ -56,6 +56,7 @@ void StaticAssert::semantic2(Scope *sc)
ScopeDsymbol *sd = new ScopeDsymbol();
sc = sc->push(sd);
sc->flags |= SCOPEstaticassert;
++sc->ignoreTemplates;
Expression *e = exp->semantic(sc);
sc = sc->pop();
if (e->type == Type::terror)