Bug 20909 – .offsetof fails on forward reference of field
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-06-08T18:38:31Z
Last change time
2020-07-09T21:25:58Z
Keywords
pull
Assigned to
No Owner
Creator
Boris Carvajal
Comments
Comment #0 by boris2.9 — 2020-06-08T18:38:31Z
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)
Comment #1 by dlang-bot — 2020-06-08T19:42:46Z
@BorisCarvajal created dlang/dmd pull request #11253 "Fix Issue 20909 - .offsetof fails on forward reference of field" fixing this issue:
- Fix Issue 20909 - .offsetof fails on forward reference of field
https://github.com/dlang/dmd/pull/11253
Comment #2 by dlang-bot — 2020-07-02T12:13:06Z
dlang/dmd pull request #11253 "Fix Issue 20909 - .offsetof fails on forward reference of field" was merged into stable:
- 5eac9669f827121b494e1ea35afcc8e63c2f76ec by Boris Carvajal:
Fix Issue 20909 - .offsetof fails on forward reference of field
https://github.com/dlang/dmd/pull/11253
Comment #3 by dlang-bot — 2020-07-09T21:25:58Z
dlang/dmd pull request #11400 "merge stable" was merged into master:
- bafab33f27941c60a1aeb352084212fa7a0809c0 by Boris Carvajal:
Fix Issue 20909 - .offsetof fails on forward reference of field
https://github.com/dlang/dmd/pull/11400