summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2020-02-06 21:58:04 -0800
committerGitHub <noreply@github.com>2020-02-07 06:58:04 +0100
commit7481f4375303f3bf41ec1d7f685283e558856531 (patch)
tree09000aefe47e211b6391ee58a51ab978d2e560ca /compiler
parente24443f1bc7f10349c8ab6981364a883f0fc060a (diff)
downloadNim-7481f4375303f3bf41ec1d7f685283e558856531.tar.gz
fix #13349 regression: isNamedTuple now works with generic tuples (#13350)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/docgen2.nim2
-rw-r--r--compiler/semmagic.nim1
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler/docgen2.nim b/compiler/docgen2.nim
index b5ef7e32d..438417ca0 100644
--- a/compiler/docgen2.nim
+++ b/compiler/docgen2.nim
@@ -11,7 +11,7 @@
 # semantic checking.
 
 import
-  options, ast, msgs, idents, passes, docgen, lineinfos, pathutils
+  options, ast, msgs, passes, docgen, lineinfos, pathutils
 
 from modulegraphs import ModuleGraph, PPassContext
 
diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim
index 0cd5a5332..41a920371 100644
--- a/compiler/semmagic.nim
+++ b/compiler/semmagic.nim
@@ -176,6 +176,7 @@ proc evalTypeTrait(c: PContext; traitCall: PNode, operand: PType, context: PSym)
                      hasDestructor(t)
     result = newIntNodeT(toInt128(ord(not complexObj)), traitCall, c.graph)
   of "isNamedTuple":
+    var operand = operand.skipTypes({tyGenericInst})
     let cond = operand.kind == tyTuple and operand.n != nil
     result = newIntNodeT(toInt128(ord(cond)), traitCall, c.graph)
   of "distinctBase":