-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
can't build a tuple with static int
element
#10073
Comments
But |
/cc @Araq why would
seems to me there's a bug in when true:
type Foo = object
age: int
proc foo[N: static int](dims: array[N, int])=
const N1 = N
let temp1 = N # works
let temp2 = Foo(age: N)
# let temp3 = (age:N) # uncomment gives: Error: invalid type: 'static[int](2)' in this context: 'tuple[age: static[int](2)]' for let
foo([1, 2]) /cc @LemonBoy (because your fix in #9046 for #9043 added a test case that's blocking my PR #10070 ; and after reduction, I'm getting the bug mentioned in this issue) |
can't build a tuple with
static int
elementExample
Current Output
Expected Output
compiles because
let temp = N
worksThe text was updated successfully, but these errors were encountered: