digitalmars.D.bugs - [Issue 22685] New: Template function instantiated with lambda and
- d-bugmail puremagic.com (30/30) Jan 17 2022 https://issues.dlang.org/show_bug.cgi?id=22685
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: nobody puremagic.com Reporter: default_357-line 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` --
Jan 17 2022