Bug 7701 – ICE(e2ir.c) on access of instance fn on nested templated struct type

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-13T06:27:00Z
Last change time
2013-10-14T03:17:48Z
Keywords
ice
Assigned to
nobody
Creator
michal.minich

Comments

Comment #0 by michal.minich — 2012-03-13T06:27:48Z
dmd 2.058 struct S { struct S2 (T) { void fn () {} } } void main () { S s; s.S2!int.fn(); // Internal error: e2ir.c 688 } happens only when no other error is in file there should be some error message because fn is not static when fn is static it compiles file as it should
Comment #1 by robert — 2012-05-02T08:32:34Z
See also: bug #7847 and bug #7851
Comment #2 by bugzilla — 2013-10-04T12:36:19Z
Interestingly, when the template is removed, we get a correct error message: struct S { struct S2 { void fn () {} } } void main () { S s; s.S2.fn(); // Error: need 'this' for 'fn' of type 'void()' }
Comment #3 by verylonglogin.reg — 2013-10-14T03:17:48Z
*** This issue has been marked as a duplicate of issue 7645 ***