From 8a46f243a9a871a5bb59c62527c97379343ab6cb Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Thu, 18 Sep 2008 20:06:41 +0100 Subject: [PATCH] Ignore maybe attributes when matching templates --- dmd/template.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dmd/template.c b/dmd/template.c index 3e326e0..38e1e75 100644 --- a/dmd/template.c +++ b/dmd/template.c @@ -1285,6 +1285,11 @@ MATCH Type::deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, if (!tparam) goto Lnomatch; + if (tparam->ty == Tmaybe) + tparam = tparam->next; + if (this->ty == Tmaybe) + return next->deduceType(sc, tparam, parameters, dedtypes); + if (this == tparam) goto Lexact; -- 2.11.4.GIT