[Issue 22685] New: Template function instantiated with lambda and overload is nested incorrectly
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 17 16:51:00 UTC 2022
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 at puremagic.com
Reporter: default_357-line at 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`
--
More information about the Digitalmars-d-bugs
mailing list