← Back to index
|
Original Bugzilla link
Bug 12318 – Nested structs with only templated methods do not capture context
Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-08T11:07:00Z
Last change time
2016-03-24T16:33:59Z
Keywords
rejects-valid
Assigned to
nobody
Creator
dlang-bugzilla
Comments
Comment #0
by dlang-bugzilla — 2014-03-08T11:07:23Z
////////// test.d ///////// void a(int i) { struct S { // Uncomment to fix //void dummy() {} void b()() { assert(i); } } S s; s.b(); c(s); } void c(S)(S s) { s.b(); } /////////////////////////// Compiler output: test.d(10): Error: function test.a.S.b!().b cannot access frame of function test.a test.d(15): Error: template instance test.a.S.b!() error instantiating
Comment #1
by john.loughran.colvin — 2016-03-04T17:17:09Z
I just hit this as well, it's a pain.
Comment #2
by k.hara.pg — 2016-03-24T16:33:59Z
*** This issue has been marked as a duplicate of issue 11886 ***