diff --git a/dmd/template.c b/dmd/template.c index 4023939b..c91564fd 100644 --- a/dmd/template.c +++ b/dmd/template.c @@ -2945,7 +2945,10 @@ void TemplateValueParameter::semantic(Scope *sc) valType = valType->semantic(loc, sc); if (!(valType->isintegral() || valType->isfloating() || valType->isString()) && valType->ty != Tident) - error(loc, "arithmetic/string type expected for value-parameter, not %s", valType->toChars()); + { + if (valType != Type::terror) + error(loc, "arithmetic/string type expected for value-parameter, not %s", valType->toChars()); + } if (specValue) { Expression *e = specValue;