Odin dev-2025-11:e5153a937
macOS 15.6.1
test.odin(30:13) Warning: Declaration of 's' may cause a stack overflow due to its type 'SecondScene' having a size of 399999996 bytes
switch &s in state.scene {
package test
SceneType :: enum {
MAIN,
SECONDARY,
}
Scene :: union {
MainScene,
SecondScene,
}
MainScene :: struct {
data: [99999999]i32,
}
SecondScene :: struct {
data: [99999999]i32,
}
GameState :: struct {
scene: Scene,
}
main :: proc() {
state := new(GameState)
switch &s in state.scene {
case MainScene:
case SecondScene:
}
}