Open shayanhabibi opened 2 months ago
The problem is that Box[RefObj]
is instantiated right away, even though RefObj
is still a tyForward
type. Since the sizeof
can then not be collapsed (the size of the incomplete RefObj
is not known yet), the expression is passed on to compile-time evaluation, where the unresolved forwarded type then causes trouble.
Example
Actual Output
Expected Output
Compiles
Additional Information
Nimskull version:
Reordering the type declaration, or removing the
sizeof
call both successfully compile.References
Possibly related to other issues with type declaration order and static compiler hints such as #1413