← Back to index
|
Original Bugzilla link
Bug 12008 – alias this and "unable to resolve forward reference" error
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-27T01:05:00Z
Last change time
2014-02-01T04:50:45Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Blocks
12000
Comments
Comment #0
by k.hara.pg — 2014-01-27T01:05:12Z
Spin-off compiler regression from:
https://d.puremagic.com/issues/show_bug.cgi?id=12000#c1
struct RefCounted(T) { struct RefCountedStore { private struct Impl // line 5 { SharedInput _payload; } private void initialize(A...)(auto ref A args) { import core.memory; } void ensureInitialized() { initialize(); } } RefCountedStore _refCounted; void opAssign(SharedInput rhs) { } int refCountedPayload() { _refCounted.ensureInitialized(); return 0; } int refCountedPayload() inout; alias refCountedPayload this; } struct SharedInput { Group unused; } struct Group { RefCounted!SharedInput _allGroups; // line 45 } void main() {} Output: test.d(5): Error: struct test.RefCounted!(SharedInput).RefCounted.RefCountedStore.Impl unable to resolve forward reference in definition test.d(45): Error: template instance test.RefCounted!(SharedInput) error instantiating
Comment #1
by k.hara.pg — 2014-01-27T01:18:12Z
https://github.com/D-Programming-Language/dmd/pull/3163
Comment #2
by github-bugzilla — 2014-01-28T16:18:24Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/62252aab2f51170c9c7c32e4f3ae49e08b7a5158
fix Issue 12008 - alias this and "unable to resolve forward reference" error
https://github.com/D-Programming-Language/dmd/commit/6b1eaf4e0eb89ec2bc01f0d6db9b694a45de96da
Merge pull request #3163 from 9rnsr/fix12008 [REG2.065a] Issue 12008 - alias this and "unable to resolve forward reference" error
Comment #3
by github-bugzilla — 2014-02-01T04:50:45Z
Commit pushed to 2.065 at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/00b4138457d5cf2bc0cf33d1a69b028d3a50c40d
Merge pull request #3163 from 9rnsr/fix12008 [REG2.065a] Issue 12008 - alias this and "unable to resolve forward reference" error