Skip to content
New issue

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

(Compiler Panic) GB_PANIC with Parapoly note due to generic parameters #4850

Open
speechfreedoms opened this issue Feb 15, 2025 · 0 comments

Comments

@speechfreedoms
Copy link

reference Issue #4849

minimal example

package main
import sa "core:container/small_array"
Small_Array:: sa.Small_Array
main :: proc() {
    example :: proc() -> (result: sa.Small_Array) {return}
    example()
}

Issue: (Compiler Panic) GB_PANIC with Parapoly note due to generic parameters - compiler panics and halts with message:

             \Odin\src\llvm_backend_proc.cpp(72): Panic: example :: proc() -> Small_Array (was parapoly: 1 1)

See:

GB_PANIC("%.*s :: %s (was parapoly: %d %d)", LIT(entity->token.string), type_to_string(entity->type), is_type_polymorphic(entity->type, true), is_type_polymorphic(entity->type, false));

Desired

Compiler should error (if possible) in this case

compiler command

odin run . or odin build .

system info

Odin 2025-02
Windows
LLVM 18.1.8

suggested labels

Compiler failure
LLVM backend
Error messaging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant