diff --git a/src/template.c b/src/template.c index e87200e757ce..4b7d4bc55ebb 100644 --- a/src/template.c +++ b/src/template.c @@ -5265,7 +5265,7 @@ MATCH TemplateValueParameter::matchArg(Scope *sc, RootObject *oarg, ei = new VarExp(loc, f); ei = ei->semantic(sc); if (!f->needThis()) - ei = resolveProperties(sc, ei); + ei = resolvePropertiesOnly(sc, ei); /* If it was really a property, it will become a CallExp. * If it stayed as a var, it cannot be interpreted. */ diff --git a/test/runnable/template9.d b/test/runnable/template9.d index f6df6c46377a..255a0a15bbdb 100644 --- a/test/runnable/template9.d +++ b/test/runnable/template9.d @@ -4038,6 +4038,19 @@ void test13333() } } +/******************************************/ +// 13374 + +int f13374(alias a)() { return 1; } +int f13374(string s)() { return 2; } + +void x13374(int i) {} + +void test13374() +{ + assert(f13374!x13374() == 1); +} + /******************************************/ int main() @@ -4141,6 +4154,7 @@ int main() test12376(); test13235(); test13299(); + test13374(); printf("Success\n"); return 0;