digitalmars.D.bugs - [Issue 23956] New: [REG2.099.0] Can't decide between const and
- d-bugmail puremagic.com (35/35) Jun 02 2023 https://issues.dlang.org/show_bug.cgi?id=23956
https://issues.dlang.org/show_bug.cgi?id=23956 Issue ID: 23956 Summary: [REG2.099.0] Can't decide between const and non-const overload with lambda Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid Severity: regression Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: dlang-bugzilla thecybershadow.net //////////////////////// test.d //////////////////////// struct S { void fun(scope void delegate( int [])) {} void fun(scope void delegate(const(int)[])) const {} } unittest { S s; s.fun((arr) {}); } //////////////////////////////////////////////////////// Compiler says: test.d(10): Error: `test.S.fun` called with argument types `(void)` matches both: test.d(3): `test.S.fun(scope void delegate(int[]) _param_0)` and: test.d(4): `test.S.fun(scope void delegate(const(int)[]) _param_0) const` Looks very similar to issue 23274, may be the same underlying bug. --
Jun 02 2023