www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22132] New: Overload resolution bypasses visibility


          Issue ID: 22132
           Summary: Overload resolution bypasses visibility
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: pro.mathias.lang gmail.com

Test case consist of two files, `moda.d` and `modb.d`:
module moda;
private void func (int a) {}
public  void func (int a, string b) {}

module modb;
import moda;
void main ()

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.

Jul 19 2021