Bug 22132 – Overload resolution bypasses visibility

Status
RESOLVED
Resolution
DUPLICATE
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-07-20T06:39:10Z
Last change time
2021-07-20T09:58:26Z
Assigned to
No Owner
Creator
Mathias LANG

Comments

Comment #0 by pro.mathias.lang — 2021-07-20T06:39:10Z
Test case consist of two files, `moda.d` and `modb.d`: ```D module moda; private void func (int a) {} public void func (int a, string b) {} ``` ```D module modb; import moda; void main () { func(42); } ``` Compiled with `dmd moda.d modb.d`, it should complain about no overload match, but doesn't. Additionally, when the argument(s) are mismatched, both overloads show as candidates.
Comment #1 by dkorpel — 2021-07-20T09:58:26Z
*** This issue has been marked as a duplicate of issue 21829 ***