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
For any one hunting the isssue, I found out that doing prevents the panic from happening:
package bug
U :: union { []int }
main :: proc() {
x: Ux= []int{ 0 }
_=x.([]int)
}
This leads me to think that maybe the type of x is not being evaluated accurately, where the compiler thinks x is of type []int when it is of type U, thus panicking while union type asserting on a slice ?
Context
Expected Behavior
No panic.
Current Behavior
Odin\src\llvm_backend_expr.cpp(3693): Panic: TODO(bill): type assertion []int
Notes
[]int{}
, only panics when numbers are present thereOdin: dev-2025-02:0683a3d67
OS: Windows 11 Professional (version: 23H2), build 22631.4751
CPU: AMD Ryzen 7 3700X 8-Core Processor
RAM: 65457 MiB
Backend: LLVM 18.1.8
The text was updated successfully, but these errors were encountered: