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

template argument array type missmatch (index) #22881

Open
choltreppe opened this issue Oct 28, 2023 · 0 comments
Open

template argument array type missmatch (index) #22881

choltreppe opened this issue Oct 28, 2023 · 0 comments

Comments

@choltreppe
Copy link

Description

when using arrays as template arguments it seems like the index type always becomes just int:

template test[I, T](a: array[I, T]) =
  static: echo typeof(a)

test([1: 4, 2: 5])

Nim Version

Nim Compiler Version 2.0.0 [Linux: amd64]
Compiled at 2023-08-01
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: a488067

Current Output

array[0..1, int]

Expected Output

array[1..2, int]

Possible Solution

No response

Additional Information

No response

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

No branches or pull requests

2 participants