diff options
author | metagn <metagngn@gmail.com> | 2024-01-18 16:50:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 14:50:36 +0100 |
commit | 322433755058eae481f4e92b2070e886f097bd9f (patch) | |
tree | 0a758c0b1709a96ec477ea931898695d39579b6b /compiler/vmgen.nim | |
parent | 473f259268d03f87874c674c08c74cf32da11d4a (diff) | |
download | Nim-322433755058eae481f4e92b2070e886f097bd9f.tar.gz |
give typedesc param nodes type T not typedesc[T] [backport:2.0] (#23115)
fixes https://github.com/nim-lang/Nim/issues/23112, fixes a mistake in https://github.com/nim-lang/Nim/pull/22581 This makes `getType(t)` where `t` is a typedesc param with value `T` equal to `getType(T)`.
Diffstat (limited to 'compiler/vmgen.nim')
-rw-r--r-- | compiler/vmgen.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index 9bbea2b08..b7dd193be 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -2124,7 +2124,7 @@ proc gen(c: PCtx; n: PNode; dest: var TDest; flags: TGenFlags = {}) = genRdVar(c, n, dest, flags) of skParam: if s.typ.kind == tyTypeDesc: - genTypeLit(c, s.typ, dest) + genTypeLit(c, s.typ.skipTypes({tyTypeDesc}), dest) else: genRdVar(c, n, dest, flags) of skProc, skFunc, skConverter, skMacro, skTemplate, skMethod, skIterator: |