digitalmars.D.bugs - [Issue 23372] New: 'null' matched against T[] and T* selects T[]
- d-bugmail puremagic.com (25/25) Sep 24 2022 https://issues.dlang.org/show_bug.cgi?id=23372
https://issues.dlang.org/show_bug.cgi?id=23372 Issue ID: 23372 Summary: 'null' matched against T[] and T* selects T[] Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: maxsamukha gmail.com void baz(T)(T* a) { } void baz(T)(T[] a) { } void main() { baz(null); // baz(T)(T*) is instantiated } Compilation should fail with an ambiguity error. --
Sep 24 2022