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
Odin: dev-2024-11:e6475fec4 OS: Windows 11 Professional (version: 23H2), build 22631.4317 CPU: 13th Gen Intel(R) Core(TM) i3-1315U RAM: 7835 MiB Backend: LLVM 18.1.8
Expected the compiler to error on the omitted parapoly parameter.
Compiler asserts with llvm_backend_general.cpp(1856): Assertion Failure: "type != t_invalid" when building the below example.
llvm_backend_general.cpp(1856): Assertion Failure: "type != t_invalid"
The bug is reproducible with the below example. I believe it only happens when the parameter is omitted on a return type.
#3949 is a similar bug or if this is a duplicate then feel free to close it.
package main Stack :: struct($Value: typeid) { top: ^StackNode(Value), } StackNode :: struct($Value: typeid) { next: ^StackNode(Value), v: Value, } pop_node :: proc(stack: ^Stack($T)) -> ^StackNode { popped := stack.top // Popping logic return popped } main :: proc() { stack: Stack(int) popped := pop_node(&stack) }
The assertion goes away if we change the signature of pop_node to pop_node :: proc(stack: ^Stack($T)) -> ^StackNode(T)
pop_node
pop_node :: proc(stack: ^Stack($T)) -> ^StackNode(T)
N/A
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Context
Expected Behavior
Expected the compiler to error on the omitted parapoly parameter.
Current Behavior
Compiler asserts with
llvm_backend_general.cpp(1856): Assertion Failure: "type != t_invalid"
when building the below example.Failure Information (for bugs)
The bug is reproducible with the below example. I believe it only happens when the parameter is omitted on a return type.
#3949 is a similar bug or if this is a duplicate then feel free to close it.
Steps to Reproduce
The assertion goes away if we change the signature of
pop_node
topop_node :: proc(stack: ^Stack($T)) -> ^StackNode(T)
Failure Logs
N/A
The text was updated successfully, but these errors were encountered: