Bug 7278 – Templated struct (instantiated with null) can't access its own members (DMD confused about struct's type)

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-12T00:49:00Z
Last change time
2012-01-15T23:21:44Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
bus_dbugzilla

Comments

Comment #0 by bus_dbugzilla — 2012-01-12T00:49:37Z
struct Foo(string s) { string var; void func() { string local = var; } } Foo!null a; Foo!null b; --------------------------- Result: test.d(6): Error: this for var needs to be type Foo not type Foo!(null) --------------------------- Both 'a' and 'b' need to be there to trigger this bug.
Comment #1 by k.hara.pg — 2012-01-12T02:12:50Z
Comment #2 by bugzilla — 2012-01-15T23:21:44Z