[Issue 15965] New: [REG 2.070] Reference to other CT-known field on struct instantiation now yields "circular reference"
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Apr 28 09:53:26 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15965
Issue ID: 15965
Summary: [REG 2.070] Reference to other CT-known field on
struct instantiation now yields "circular reference"
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: mathias.lang at sociomantic.com
CC: public at dicebot.lv
Here's an extract of a piece of code we had:
```
struct Element
{
public ubyte[256] val;
private ubyte[(val.offsetof + 256) % size_t.sizeof] _padding;
}
```
This used to compile up until 2.071.0, where it broke.
Is it an intentional change, and is it expected that accessing `offsetof`
during struct instantiation now fails ?
--
More information about the Digitalmars-d-bugs
mailing list