Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/template.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
14 changes: 14 additions & 0 deletions test/runnable/template9.d
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -4141,6 +4154,7 @@ int main()
test12376();
test13235();
test13299();
test13374();

printf("Success\n");
return 0;
Expand Down