Open SolitudeSF opened 5 years ago
Adding a call to test()
inside a.nim
causes it to compile and run correctly.
At first sight I thought this would be the same thing as https://github.com/nim-lang/Nim/issues/11155, but it isn't. The convert
symbol is resolved in test
, which is defined in a.nim
, a totally valid context to use the unexported convert
function.
Btw a non generic version of test
will make this example compile.
proc convert(arg: HSlice): string = discard
proc implicitConvert(args: varargs[string, convert]) = discard
# non generic version of ``test``
proc test*(arg: HSlice[int,int]) =
implicitConvert(arg)
Any leads on how to address this? I seem to be suffering from the same or a similar issue.
Edit: Adding an unused non-generic call to the generic proc makes it compile correctly. Exporting the conversion proc also does.
Invoking generic procedure that uses varargs implicit conversion breaks.
Example
a.nim
b.nim
Current Output
Expected Output
Should compile.
Additional Information
Adding explicit generic parameters to
HSlice
intest
proc makes program compile.