diff options
author | cooldome <cdome@bk.ru> | 2020-01-17 08:17:18 +0000 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2020-01-17 09:17:18 +0100 |
commit | 2bf337abaefe862bc7e05cc0c907a3095b1f429c (patch) | |
tree | a7cef6bd98e70b72c097dc15af709ea89b8f3c9d /compiler/semmagic.nim | |
parent | 41cf609fc7c15a63ea7d99771f6d812e65539704 (diff) | |
download | Nim-2bf337abaefe862bc7e05cc0c907a3095b1f429c.tar.gz |
fixes #13095 (#13181)
* fixes #13095 * fix typo
Diffstat (limited to 'compiler/semmagic.nim')
-rw-r--r-- | compiler/semmagic.nim | 3 |
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", "|": |