Bug 22157 – Bad diagnostic for static/non-static overload resolution conflict

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-07-29T11:31:58Z
Last change time
2021-08-09T23:10:47Z
Keywords
diagnostic, pull
Assigned to
No Owner
Creator
Max Samukha

Comments

Comment #0 by maxsamukha — 2021-07-29T11:31:58Z
(1): struct S { static void foo() { } void foo() { } } void main() { S.foo; } onlineapp.d(10): Error: `onlineapp.S.foo` called with argument types `()` matches both: onlineapp.d(2): `onlineapp.S.foo()` and: onlineapp.d(5): `onlineapp.S.foo()` (2): struct S { void foo() { } static void foo() { } } void main() { S.foo; } onlineapp.d(10): Error: need `this` for `foo` of type `void()` In both cases, the "matches both" error is expected.
Comment #1 by razvan.nitu1305 — 2021-08-03T15:28:58Z
Regression since 2.089.1.
Comment #2 by razvan.nitu1305 — 2021-08-03T15:33:53Z
Actually, it's a 2.060.0 regression. Up until 2.089.0 both errors were outputted.
Comment #3 by dlang-bot — 2021-08-05T13:00:45Z
@RazvanN7 created dlang/dmd pull request #12958 "Fix Issue 22157 - Bad diagnostic for static/non-static overload resolution conflict" fixing this issue: - Fix Issue 22157 - Bad diagnostic for static/non-static overload resolution conflict https://github.com/dlang/dmd/pull/12958
Comment #4 by dlang-bot — 2021-08-06T09:01:27Z
dlang/dmd pull request #12958 "Fix Issue 22157 - Bad diagnostic for static/non-static overload resolution conflict" was merged into stable: - 3a427db4427dacedbc332341790cd12dea0797d7 by RazvanN7: Fix Issue 22157 - Bad diagnostic for static/non-static overload resolution conflict https://github.com/dlang/dmd/pull/12958
Comment #5 by dlang-bot — 2021-08-09T23:10:47Z
dlang/dmd pull request #12967 "merge stable" was merged into master: - 196305631793e8a76bb77a8f65ad770bb9d006ef by Razvan Nitu: Fix Issue 22157 - Bad diagnostic for static/non-static overload resolution conflict (#12958) https://github.com/dlang/dmd/pull/12967