You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: type mismatch: got <Tensor[system.int]>
but expected one of:
proc echo(x: varargs[typed, `$`])
first type mismatch at position: 1
required type for x: varargs[typed]
but expression 'foo' is of type: Tensor[system.int]
expression: echo foo
Version info:
nim --version
Nim Compiler Version 1.6.0 [Linux: amd64]
Compiled at 2021-10-19
Copyright (c) 2006-2021 by Andreas Rumpf
git hash: 727c6378d2464090564dbcd9bc8b9ac648467e38
active boot switches: -d:release
The text was updated successfully, but these errors were encountered:
I stumbled on possibly the same issue before, but always in complex situations and could never find a simple example. I'll see whether I can fix it somehow.
edit:
The following is already enough to trigger the issue:
Note: The ForLoopStmt is required. If using typed or untyped it works. It also works if the argument of enumerate is not an add stmt (i.e. just discard or result = newStmtList(). Maybe something else triggers it too though).
Also changing the name of the macro to something other than enumerate makes the code compile. The issue is likely that the ForLoopStmt macros mess up the overload resolution within arraymancer, as there are enumerate iterators.
This works:
This doesn't:
Version info:
The text was updated successfully, but these errors were encountered: