summary refs log tree commit diff stats
path: root/compiler/semmagic.nim
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2020-01-17 08:17:18 +0000
committerAndreas Rumpf <rumpf_a@web.de>2020-01-17 09:17:18 +0100
commit2bf337abaefe862bc7e05cc0c907a3095b1f429c (patch)
treea7cef6bd98e70b72c097dc15af709ea89b8f3c9d /compiler/semmagic.nim
parent41cf609fc7c15a63ea7d99771f6d812e65539704 (diff)
downloadNim-2bf337abaefe862bc7e05cc0c907a3095b1f429c.tar.gz
fixes #13095 (#13181)
* fixes #13095

* fix typo
Diffstat (limited to 'compiler/semmagic.nim')
-rw-r--r--compiler/semmagic.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim
index 3b329c50c..0cd5a5332 100644
--- a/compiler/semmagic.nim
+++ b/compiler/semmagic.nim
@@ -133,6 +133,9 @@ proc evalTypeTrait(c: PContext; traitCall: PNode, operand: PType, context: PSym)
   template typeWithSonsResult(kind, sons): PNode =
     newTypeWithSons(context, kind, sons).toNode(traitCall.info)
 
+  if operand.kind == tyGenericParam or (traitCall.len > 2 and operand2.kind == tyGenericParam):
+    return traitCall  ## tpo early to evaluate
+    
   let s = trait.sym.name.s
   case s
   of "or", "|":