Bug 7216 – [CTFE] Can't call struct member function using pointer field

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2012-01-03T23:51:00Z
Last change time
2015-06-09T05:11:50Z
Keywords
rejects-valid
Assigned to
nobody
Creator
verylonglogin.reg

Comments

Comment #0 by verylonglogin.reg — 2012-01-03T23:51:19Z
--- struct S { S* ptr; int t; // no errors if `t` is commented void f() { } } int f() { S s0, s1; s0.ptr = &s1; s0.ptr.f(); // Error: couldn't find field ptr of type S in S(s1,0) return 0; } void main() { enum e = f(); } ---
Comment #1 by github-bugzilla — 2012-01-21T15:02:31Z
Comment #2 by bugzilla — 2012-01-21T16:12:01Z