[Issue 7216] New: [CTFE] Can't call struct member function using pointer field
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 3 23:51:20 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7216
Summary: [CTFE] Can't call struct member function using pointer
field
Product: D
Version: D1 & D2
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis <verylonglogin.reg at gmail.com> 2012-01-04 10:51:19 MSK ---
---
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();
}
---
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list