Bug 11800 – alias this matching incorrectly changes lvalue-ness

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-22T05:14:00Z
Last change time
2013-12-22T14:27:39Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-12-22T05:14:37Z
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
Comment #1 by k.hara.pg — 2013-12-22T05:21:06Z
Comment #2 by github-bugzilla — 2013-12-22T13:22:36Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d1fec048072baeae596bc984ad67de201594015c fix Issue 11800 - alias this matching incorrectly changes lvalue-ness https://github.com/D-Programming-Language/dmd/commit/30aee1d5978c7c0cca5a13741371584214f3772a Merge pull request #3009 from 9rnsr/fix11800 Issue 11800 - alias this matching incorrectly changes lvalue-ness