http://d.puremagic.com/issues/show_bug.cgi?id=9807
Summary: with statement does not work with alias this
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Robert Clipsham <[email protected]> 2013-03-24
13:26:27 GMT ---
The with statement does not appear to take alias this into account:
----
void test(T)(T t)
{
}
struct Foo {
string[string] strs;
alias strs this;
}
void main()
{
Foo f;
test(f.keys[0]); // Fine
with(f) {
test(keys[0]); // Not fine
}
}
----
test.d(15): Error: undefined identifier keys
Using dmd 2.062.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------