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
package bugs
main :: proc(){
a : union {int, f32, [2]f32 }
switch &v in a {
case int, f32:
pointer :rawptr = &v
case [2]f32:
}
}
Expected Behavior
the compiler either gets the correct pointer of the value, or gives an error saying "cannot take adress of multiple value switch"
Current Behavior
compiler crashes
Failure Information
bugs.main lb_emit_conv: src -> dst Not Identical union {int, f32, [2]f32} != rawptr Not Identical union {int, f32, [2]f32} != rawptr Not Identical 1af99d5b630 != 7ff6bd23b6e8 Not Identical 1af99d5b630 != 7ff6bd23b6e8 D:\a\Odin\Odin\src\llvm_backend_expr.cpp(2478): Panic: Invalid type conversion: 'union {int, f32, [2]f32}' to 'rawptr' for procedure 'bugs.main'
Steps to Reproduce
run the provided code in a fresh odin project
The text was updated successfully, but these errors were encountered:
Context
Code
Expected Behavior
the compiler either gets the correct pointer of the value, or gives an error saying "cannot take adress of multiple value switch"
Current Behavior
compiler crashes
Failure Information
bugs.main lb_emit_conv: src -> dst Not Identical union {int, f32, [2]f32} != rawptr Not Identical union {int, f32, [2]f32} != rawptr Not Identical 1af99d5b630 != 7ff6bd23b6e8 Not Identical 1af99d5b630 != 7ff6bd23b6e8 D:\a\Odin\Odin\src\llvm_backend_expr.cpp(2478): Panic: Invalid type conversion: 'union {int, f32, [2]f32}' to 'rawptr' for procedure 'bugs.main'
Steps to Reproduce
run the provided code in a fresh odin project
The text was updated successfully, but these errors were encountered: