Bug 9890 – Alias This + Alias Fields

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-06T08:29:00Z
Last change time
2013-04-08T15:25:57Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
dsimcha

Comments

Comment #0 by dsimcha — 2013-04-06T08:29:38Z
Test program: struct RefCounted(T) { T _payload; ref T refCountedPayload() { return _payload; } alias refCountedPayload this; } struct S(int x_) { alias x_ x; } alias RefCounted!(S!1) Rs; static assert(Rs.x == 1); Version <= 2.060: Works Version >= 2.061: test.d(22): Error: need 'this' for refCountedPayload type ref S!(1)()
Comment #1 by andrej.mitrovich — 2013-04-06T11:12:57Z
I don't see any static fields here.
Comment #2 by dsimcha — 2013-04-06T11:39:55Z
Misspoke. I meant compile-time fields, aliases and possibly others that I haven't tested.
Comment #3 by k.hara.pg — 2013-04-07T22:34:40Z
Comment #4 by github-bugzilla — 2013-04-08T15:25:40Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/7298424fae54a09c08df75f2444db0ff5f0ddfc4 fix Issue 9890 - Alias This + Alias Fields https://github.com/D-Programming-Language/dmd/commit/1d56f71cb1e737d9165c2a5c957ceae299c7d0ae Merge pull request #1867 from 9rnsr/fix9890 [REG2.061] Issue 9890 - Alias This + Alias Fields