Feedback Thread: DIP 1034--Add a Bottom Type (reboot)--Final Review
Dennis
dkorpel at gmail.com
Wed Sep 23 15:54:40 UTC 2020
On Tuesday, 22 September 2020 at 17:24:02 UTC, Paul Backus wrote:
> Currently, all structs and unions must have .init values that
> are computable at compile time, which means that adding a
> noreturn field would have to be a compile-time error, since it
> makes the .init value impossible to compute.
You can still compute an init value, it'd be the same bytes as
when the noreturn fields weren't there. I don't think foo0 and
foo1 should act differently here:
```
struct S {
int x;
noreturn y;
double z;
}
void foo0() {
S s;
}
void foo1() {
int x;
noreturn y;
double z;
}
```
More information about the Digitalmars-d
mailing list