[Issue 8245] New: UFCS doesn't work for pointers
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 14 12:01:47 PDT 2012
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: nobody at puremagic.com
ReportedBy: dawg at dawgfoto.de
--- Comment #0 from dawg at 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: -------
More information about the Digitalmars-d-bugs
mailing list