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

varargs used in a tuple gives cgen error #18102

Open
timotheecour opened this issue May 26, 2021 · 0 comments
Open

varargs used in a tuple gives cgen error #18102

timotheecour opened this issue May 26, 2021 · 0 comments

Comments

@timotheecour
Copy link
Member

Example

when true:
  proc fn(a, int, b: varargs[int]) =
    echo (a, b)
  fn(1)

Current Output

@mt12319.nim.c:210:32: error: passing 'tyVarargs__cLNJubUogBf9cxa9butXtOHQ' to parameter of incompatible type 'NI *' (aka 'long long *')
        T1_ = dollar__t4950514957_149(x, xLen_0);
                                      ^
/Users/timothee/git_clone/nim/timn/build/nimcache/@mt12319.nim.c:195:70: note: passing argument to parameter 'x' here
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar__t4950514957_149)(NI* x, NI xLen_0) {
                                                                     ^
/Users/timothee/git_clone/nim/timn/build/nimcache/@mt12319.nim.c:234:39: error: passing 'NI *' (aka 'long long *') to parameter of incompatible type 'tyVarargs__cLNJubUogBf9cxa9butXtOHQ'
        addQuoted_t4950514957_143((&result), x.Field0.Field0, x.Field0.Field1);

Expected Output

give CT error

Additional Information

cgen error in 1.5.1 7f077a7
CT error in 1.0.0 (but maybe not the right one): dollars.nim(57, 9) Error: invalid type: 'varargs[int]' in this context: 'tuple of (varargs[int], varargs[int])'

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

1 participant