diff --git a/src/template.c b/src/template.c index d312899f5fbf..4c8e9685908e 100644 --- a/src/template.c +++ b/src/template.c @@ -5355,7 +5355,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 8e001221fe82..0c2900b6b7b6 100644 --- a/test/runnable/template9.d +++ b/test/runnable/template9.d @@ -4104,6 +4104,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() @@ -4208,6 +4221,7 @@ int main() test13235(); test13294(); test13299(); + test13374(); printf("Success\n"); return 0;