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

bit_count should also work on imported type #1974

Open
proppy opened this issue Mar 5, 2025 · 0 comments
Open

bit_count should also work on imported type #1974

proppy opened this issue Mar 5, 2025 · 0 comments
Labels
bug Something isn't working or is incorrect dslx DSLX (domain specific language) implementation / front-end 🧦 sox

Comments

@proppy
Copy link
Member

proppy commented Mar 5, 2025

Describe the bug

bit_count only seems to recognize on local types as valid argument.

To Reproduce

import float32;

const F32_SIZE = bit_count<float32::F32>();

produces the following error:

0005: const F32_SIZE = bit_count<float32::F32>();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^--------------^ TypeInferenceError: The parametric argument for 'bit_count' should be a type and not a value.

aliasing the type locally w/:

type F32 = float32::F32;
const F32_SIZE = bit_count<float32::F32>();

workaround the issue.

Expected behavior

Imported type should also be recognized by the bit_count builtin.

@proppy proppy added bug Something isn't working or is incorrect dslx DSLX (domain specific language) implementation / front-end 🧦 sox labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or is incorrect dslx DSLX (domain specific language) implementation / front-end 🧦 sox
Projects
Status: No status
Development

No branches or pull requests

1 participant