[Issue 3015] New: Lookup of non-member not working
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 20 20:24:16 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3015
Summary: Lookup of non-member not working
Product: D
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: andrei at metalanguage.com
This code doesn't compile:
struct R
{
bool empty();
ref int front();
void popFront();
}
ref int popNext(ref R fwdRange)
{
auto result = & fwdRange.front();
fwdRange.popFront;
return *result;
}
void main()
{
R r;
int x = r.popNext;
}
The code should work: popNext should be looked up in R's outer scope if not a
member.
--
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