[Issue 23372] New: 'null' matched against T[] and T* selects T[]

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 24 19:16:00 UTC 2022


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 at puremagic.com
          Reporter: maxsamukha at 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.

--


More information about the Digitalmars-d-bugs mailing list