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
Hint: used config file '/playground/nim/config/nim.cfg' [Conf]
Hint: used config file '/playground/nim/config/config.nims' [Conf]
...........................................................
proc init[S](a: MyModel[S]): MyModel[S] =
/usercode/in.nim(39, 8) template/generic instantiation of `network` from here
/usercode/in.nim(11, 19) Error: cannot instantiate MyModel [type declared in /usercode/in.nim(3, 6)]
got: <S>
but expected: <T>
Expected Output
It should compile.
Additional Information
$ nim -v
Nim Compiler Version 1.7.1 [Linux: amd64]
Compiled at 2022-02-15
Copyright (c) 2006-2022 by Andreas Rumpf
git hash: b2c5d7b4ff070abe2145e998d090fb15b4df522f
active boot switches: -d:release
Workaround
A workaround is to copy the offending NimNode at usage:
A macro generating a function fails with
got: <S> but expected: <T>
.Example
Current Output
Expected Output
It should compile.
Additional Information
Workaround
A workaround is to copy the offending NimNode at usage:
The text was updated successfully, but these errors were encountered: