Open Dopsh opened 4 months ago
Odin: dev-2024-07:51733fce6 OS: Windows 10 Home Basic (version: 22H2), build 19045.4651 CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz RAM: 65495 MiB Backend: LLVM 18.1.8
Expected to get a new array with the correct values in each slot.
When performing && or || on boolean arrays, the compiler will panic with the following output:
main.main lb_emit_conv: src -> dst Not Identical [10]bool != llvm bool Not Identical [10]bool != llvm bool Not Identical 2c2d66f7fa0 != 7ff74b925190 Not Identical 2c2d66f7fa0 != 7ff74b925190 d:\odin\src\llvm_backend_expr.cpp(2463): Panic: Invalid type conversion: '[10]bool' to 'llvm bool' for procedure 'main.main'
Code to cause the panic:
package main main :: proc() { a, b: [10] bool c := a && b }
This behaviour should NOT be allowed in the first place. Odin does not support boolean array programming.
Context
Expected Behavior
Expected to get a new array with the correct values in each slot.
Current Behavior
When performing && or || on boolean arrays, the compiler will panic with the following output:
Steps to Reproduce
Code to cause the panic: