pervognsen / bitwise

Bitwise is an educational project where we create the software/hardware stack for a computer from scratch.
Other
5.14k stars 212 forks source link

#static_assert directive does not seem to resolve types #72

Open uucidl opened 6 years ago

uucidl commented 6 years ago
struct A
{
  b: B;
}
// says Unresolved type name 'B'
#static_assert(sizeof(A) == 4)

struct B
{
  data: int32;
}

The workaround is to rearrange declarations so that B is defined before A.