Skip to content

Commit

Permalink
Merge pull request #2353 from 9rnsr/fix_bug
Browse files Browse the repository at this point in the history
[critical] fix small bug introduced by #1660
  • Loading branch information
WalterBright committed Jul 17, 2013
2 parents cc6b737 + ad248c2 commit e4795a4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/expression.c
Expand Up @@ -8382,8 +8382,9 @@ Expression *CallExp::semantic(Scope *sc)
/* Attempt to instantiate ti. If that works, go with it.
* If not, go with partial explicit specialization.
*/
if (ti->semanticTiargs(sc) &&
ti->needsTypeInference(sc, 1))
if (!ti->semanticTiargs(sc))
return new ErrorExp();
if (ti->needsTypeInference(sc, 1))
{
/* Go with partial explicit specialization
*/
Expand Down Expand Up @@ -8414,9 +8415,10 @@ Expression *CallExp::semantic(Scope *sc)
/* Attempt to instantiate ti. If that works, go with it.
* If not, go with partial explicit specialization.
*/
if (se->findTempDecl(sc) &&
ti->semanticTiargs(sc) &&
ti->needsTypeInference(sc, 1))
if (!se->findTempDecl(sc) ||
!ti->semanticTiargs(sc))
return new ErrorExp();
if (ti->needsTypeInference(sc, 1))
{
/* Go with partial explicit specialization
*/
Expand Down

0 comments on commit e4795a4

Please sign in to comment.