```d struct embed(T) { alias payload this; @property payload() inout { embed_instance ; } } class Bufferz { } struct Buffer { embed!Bufferz _range ; pragma(inline) { } } ```
for v2.072.0-b2 ```sh struct embed(T) { T embed_instance ; @property payload() { return embed_instance ; } } class Bufferz { alias owner this ; Buffer* _owner ; auto owner() { return _owner ; } } struct Buffer { alias range this ; embed!Bufferz _range ; auto range() { return _range.payload ; } ref slice() { Slice; } pragma(inline) { } } ```
(In reply to changlon from comment #1) Reduced/simplified further: ---- class Bufferz { alias owner this; Buffer owner() { return Buffer.init; } } struct Buffer { alias range this; Bufferz range() { return Bufferz.init; } void slice() { error; } } ---- You marked this as a regression, but you didn't specify which previous version of dmd doesn't have the problem. For a bug to be a regression, the code must have worked at some point. Downgrading to "normal".
Compiling this with dmd 2.081 issues: Error: undefined identifier embed_instance and no seg fault. Closing as fixed