You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct Container(T)
{
// T.sizeof/alignof causes circular reference!
enum AllocAlignment = T.sizeof;
T* ptr;
}
struct Test
{
Container!Test test;
}
error : struct `main.Test` no size because of forward reference
error : template instance `main.Container!(Test)` error instantiating
Checking T.sizeof causes a forward referencing error; but it doesn't need to evaluate that enum to determine the size of `Container!T` which has a know-able size with no T knowledge... evaluation should be deferred.
The text was updated successfully, but these errors were encountered:
Manu reported this on 2024-11-25T06:11:36Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=24878
Description
The text was updated successfully, but these errors were encountered: