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

Support type aliases as kinds #6605

Open
michaeljklein opened this issue Nov 22, 2024 · 0 comments
Open

Support type aliases as kinds #6605

michaeljklein opened this issue Nov 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@michaeljklein
Copy link
Contributor

michaeljklein commented Nov 22, 2024

Problem

Attempted to compile a program where a numeric generic's kind is a type alias for u32:

pub type SomeAlias = u32;

pub struct Foo<let N: SomeAlias> { }

fn main() { }

Happy Case

Expected the program to compile successfully, but it currently fails with:

error: N has a type of SomeAlias. The only supported numeric generic types are `u1`, `u8`, `u16`, and `u32`.
  ┌─ src/main.nr:3:20
  │
3 │ pub struct Foo<let N: SomeAlias> { }
  │                    - Unsupported numeric generic type
  │

Aborting due to 1 previous error

On version:

nargo version = 0.39.0
noirc version = 0.39.0+df8f2eee5c27d3cd4b6128056afdd9bd4a0322fe
(git version hash: df8f2eee5c27d3cd4b6128056afdd9bd4a0322fe, is dirty: false)

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

Nice-to-have

Blocker Context

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@michaeljklein michaeljklein added the enhancement New feature or request label Nov 22, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant