-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Description
Using genericParams from typetraits is fine, but encapsulating in a function gives an internal error.
This is observed using "latest" in play.nim-lang.org playground.
echo genericParams(seq[int]) works fine and gives the expected output.
Example
import typetraits
proc contained_type(S: typedesc): string = $genericParams(S)
echo contained_type(seq[int])Current Output
/usercode/in.nim(5, 20) template/generic instantiation of `contained_type` from here
/usercode/in.nim(3, 58) template/generic instantiation of `genericParams` from here
/usercode/in.nim(5, 20) template/generic instantiation of `contained_type` from here
/usercode/in.nim(3, 58) template/generic instantiation of `genericParams` from here
Error: internal error: /build/Nim/compiler/semtypes.nim(1943, 26)
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
(int,)