dmd/compiler/test/fail_compilation/test19473.d
Nicholas Wilson 13775eb2d1
Fix #18235 - Add offending member to "no size because of forward reference" error (#20557)
Co-authored-by: Nick Treleaven <ntrel002@gmail.com>
2024-12-15 18:23:36 +08:00

32 lines
518 B
D

/* TEST_OUTPUT:
---
fail_compilation/test19473.d(15): Error: union `test19473.P` no size because of forward reference
fail_compilation/test19473.d(31): error on member `test19473.P.p`
---
*/
// https://issues.dlang.org/show_bug.cgi?id=19473
struct A {
P p;
struct UTpl() {
union {
P p;
}
}
alias U = UTpl!();
}
alias B = A.U;
struct C {
union D {
B b;
}
}
union P {
C.D p;
}