http://d.puremagic.com/issues/show_bug.cgi?id=8245

           Summary: UFCS doesn't work for pointers
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: d...@dawgfoto.de


--- Comment #0 from d...@dawgfoto.de 2012-06-14 12:04:01 PDT ---
cat > bug.d << CODE
string toStr(immutable(char)* p)
{
    return null;
}

void main()
{
    immutable(char)* p = "foobar".ptr;
    p.toStr();
}
CODE

dmd -c bug
Error: no property 'toStr' for type 'immutable(char)'
----

Property resolution is only attempted on the dereferenced value.

IIUC we'd need to do 4 lookups.

- intrinsic properties
- properties of dereferenced value
- ufcs of value
- ufcs of dereferenced value (bug 8213)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to