We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A compiler panic when comparing a struct with another that it's using as a subtype.
using
CODE
Outer :: struct { using inner: struct {a: int}, b: int, } outer: Outer if outer == outer.inner { // (ノ ゜Д゜)ノ ︵ ┻━┻ }
OUTPUT
$ odin run . bug.main lb_emit_conv: src -> dst Not Identical struct {a: int} != Outer Not Identical struct {a: int} != struct {inner: struct {a: int}, b: int} Not Identical 7460decd7a30 != 7460decd78a0 Not Identical 7460decd7a30 != 7460decd7930 src/llvm_backend_expr.cpp(2324): Panic: Invalid type conversion: 'struct {a: int}' to 'Outer' for procedure 'bug.main' Illegal instruction (core dumped)
REPORT
Odin: dev-2024-06:cdd90a9a0 OS: Ubuntu 22.04.4 LTS, Linux 6.5.0-35-generic CPU: Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz RAM: 7631 MiB Backend: LLVM 17.0.6
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A compiler panic when comparing a struct with another that it's
using
as a subtype.CODE
OUTPUT
REPORT
The text was updated successfully, but these errors were encountered: