Open
Description
Context
Odin: dev-2025-02:584fdc0d4
OS: Windows 11 Professional (version: 24H2), build 26100.3194
CPU: 12th Gen Intel(R) Core(TM) i5-12600
RAM: 32540 MiB
Backend: LLVM 18.1.8
Current Behavior
The compiler enters an infinite loop, when hiding a cyclic type definition inside a polymorphic struct.
It can already detect the cyclic dependency if we do not wrap the CyclicType and just use an alias or the type directly in its own definition.
Reproduction
package repro
Wrapper :: struct($T: typeid) {
data: T,
}
CyclicType :: struct {
it: Wrapper(CyclicType),
}
// Also happens with union
CyclicUnion :: union {
f32,
Wrapper(CyclicUnion),
}
Metadata
Metadata
Assignees
Labels
No labels