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
using
When comparing a variable of type A with a variable of type B where B is using type A, compiler throws an error at the LLVM backend.
Odin: dev-2025-01:2aae4cfd4 OS: macOS Unknown CPU: Apple M2 Max RAM: 32768 MiB Backend: LLVM 19.1.6
Error: Cannot compare expression, mismatched types '^Inner_Data' and 'Data_Container' if data_ptr == container { ^~~~~~~~~~~~~~~~~~~~^
lb_emit_conv: src -> dst Not Identical ^Inner_Data != Data_Container Not Identical ^Inner_Data != struct {inner_data: ^Inner_Data, x: u32} Not Identical 113f1a460 != 102efc540 Not Identical 113f1a460 != 102efc5e0 src/llvm_backend_expr.cpp(2494): Panic: Invalid type conversion: '^Inner_Data' to 'Data_Container' for procedure 'main' zsh: trace trap odin build . -debug
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Here is a minimal reproducible example:
package odinbug import "core:fmt" Inner_Data :: struct { } Data_Container :: struct { using inner_data: ^Inner_Data, x: u32, } main :: proc() { container := Data_Container {} data_ptr: ^Inner_Data if data_ptr == container { fmt.printf("here!") } }
Here's an online playground example.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When comparing a variable of type A with a variable of type B where B is
using
type A, compiler throws an error at the LLVM backend.Context
Expected Behavior
Current Behavior
Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Here is a minimal reproducible example:
Here's an online playground example.
The text was updated successfully, but these errors were encountered: