https://issues.dlang.org/show_bug.cgi?id=22685
Issue ID: 22685 Summary: Template function instantiated with lambda and overload is nested incorrectly Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: default_357-l...@yahoo.de Consider the following code ( https://run.dlang.io/is/jJvVDN ): --- a.d import b; void main() { twoArgs!(a => 1, overloaded); } --- b.d import c : overloaded; void twoArgs(alias a, alias b)() { } void overloaded()() { } --- c.d void overloaded()() { } When calling dmd a.d, you get the remarkable a.d(5): Error: template instance `twoArgs!((a) => 1, overloaded)` `twoArgs!((a) => 1, overloaded)` is nested in both `main` and `b` --