[Issue 11800] New: alias this matching incorrectly changes lvalue-ness
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 22 05:14:40 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11800
Summary: alias this matching incorrectly changes lvalue-ness
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-12-22 05:14:37 PST ---
Spin-off issue from: https://d.puremagic.com/issues/show_bug.cgi?id=5363#c4
Reduced test case:
struct A
{
B b;
alias b this;
}
struct B
{
static struct Value {}
Value value;
alias value this;
void foo(ref const B rhs)
{
}
}
void main()
{
A a;
B b;
b.foo(a); // line 22
}
test.d(22): Error: B(a.b.value) is not an lvalue
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list