```
struct A {
B b;
}
struct B {
struct Inner {
C c;
}
}
struct C {
A a;
}
```
This results in the error:
```
a.d(12): Error: struct `a.A` no size because of forward reference
```
There's no need for this error, since an instance of B doesn't actually contain a C.
Just like there is no error in this simpler case:
```
struct A {
struct Inner {
B b;
}
}
struct B {
A a;
}
```
I discovered this when chasing a sporadic forward reference error that appeared when changing unrelated code.
Comment #1 by robert.schadek — 2024-12-13T19:31:54Z