Skip to content

bit_count should also work on imported type #1974

Open
@proppy

Description

@proppy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working or is incorrectdslxDSLX (domain specific language) implementation / front-end🧦 sox

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions