Skip to content

Panic on union Type Assertion #4809

Open
@dozn

Description

@dozn

Context

package main
main :: proc() {
    x: U = []int{0}
    _ = x.([]int)
}
U :: union { []int }

Expected Behavior

No panic.

Current Behavior

Odin\src\llvm_backend_expr.cpp(3693): Panic: TODO(bill): type assertion []int

Notes

  • Does not panic using []int{}, only panics when numbers are present there

Odin: 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions