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: [email protected]
ReportedBy: [email protected]
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: -------