annoying bug, i think at least
U :: union #no_nil {
A, B, C, D
}
f :: proc(u: U) {
switch v in u {
case A: use_a(v)
case B: use_b(v)
case: oopsy()
}
}
why does case: not get noticed? like it doesn’t exist?
annoying bug, i think at least
U :: union #no_nil {
A, B, C, D
}
f :: proc(u: U) {
switch v in u {
case A: use_a(v)
case B: use_b(v)
case: oopsy()
}
}
why does case: not get noticed? like it doesn’t exist?
If I understand everything correctly, you just need to add #partial to the switch. This is a frequently asked question: Frequently Asked Questions | Odin Programming Language
thanks, sorry for that
, wish you a great week
No problem, I had to look it up because I really wasn’t sure myself so I learned something as well ![]()
Also: welcome to the forum!