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

using type bit_set[$T] in proc parameters is unassignable #2819

Closed
karl-zylinski opened this issue Sep 26, 2023 · 0 comments
Closed

using type bit_set[$T] in proc parameters is unassignable #2819

karl-zylinski opened this issue Sep 26, 2023 · 0 comments

Comments

@karl-zylinski
Copy link
Contributor

karl-zylinski commented Sep 26, 2023

Context

It's not possible to call a proc that uses: bit_set[$T]

use_generic_bit_set :: proc(v: bit_set[$T]) {
}

MyEnum :: enum {
    A, B,
}

b := bit_set[MyEnum] {}

use_generic_bit_set(b)

Output:
Cannot assign value 'b' of type 'bit_set[MyEnum]' to 'bit_set[MyEnum]' in procedure argument

  • Operating System & Odin Version: Windows. Latest Git version.
  • Please paste odin report output:
    Odin: dev-2023-09:5cd429a0
    OS: Windows 10 Professional (version: 22H2), build 19045.3448
    CPU: Intel(R) Core(TM) i7-6950X CPU @ 3.00GHz
    RAM: 32674 MiB
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