[Issue 20909] New: .offsetof fails on forward reference of field
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 8 18:38:31 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20909
Issue ID: 20909
Summary: .offsetof fails on forward reference of field
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: boris2.9 at gmail.com
Test case:
struct S
{
pragma(msg, x.sizeof); // OK
pragma(msg, x.offsetof); // Error
int x;
}
Output:
4LU
test.d(4): Error: no property offsetof for type int
test.d(4): while evaluating pragma(msg, x.offsetof)
--
More information about the Digitalmars-d-bugs
mailing list