Nim
Nim copied to clipboard
`Error: internal error: invalid kind for lastOrd(tyGenericParam)` with overloaded generic `procs`
Description
proc fromHex[N](A: type array[N, int]) = discard
proc fromHex (T: typedesc[array[1, int]]) = discard
fromHex(array[1, int])
Nim Version
Nim Compiler Version 1.6.16 [Linux: amd64]
Compiled at 2023-10-24
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 3c9b68dc157804885b14a1984efc25e8b7cc861d
active boot switches: -d:release
Nim Compiler Version 2.0.1 [Linux: amd64]
Compiled at 2023-10-24
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: d30565f810ba5165ea2e5bcd91ea3dee9950051f
active boot switches: -d:release
Nim Compiler Version 2.1.1 [Linux: amd64]
Compiled at 2023-10-24
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 3fd4e684331a22be84e940833faee111226945ea
active boot switches: -d:release
Current Output
Error: internal error: invalid kind for lastOrd(tyGenericParam)
No stack traceback available
To create a stacktrace, rerun compilation with './koch temp c <file>', see https://nim-lang.github.io/Nim/intern.html#debugging-the-compiler for details
Expected Output
No internal error
Possible Solution
No response
Additional Information
No response
Workaround:
proc fromHex[N: static int](A: type array[N, int]) = discard
proc fromHex (T: typedesc[array[1, int]]) = discard
fromHex(array[1, int])