summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-09-12 04:55:22 +0800
committerGitHub <noreply@github.com>2022-09-11 16:55:22 -0400
commit37b3f62eef16b0e7cb89e18f9ddc1fb96e17fb1b (patch)
tree4b111a131c91de505ee3750884bac5aa09b7556e /compiler
parent9b9f24f01bb373362b476a0754a5de95bd108d76 (diff)
downloadNim-37b3f62eef16b0e7cb89e18f9ddc1fb96e17fb1b.tar.gz
fixes #20155; repr range with distinct types is broken with ORC (#20158)
* fixes #20155; repr range with distinct types is broken with ORC

* skipRanges
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semmagic.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim
index d3e12670b..a6832de50 100644
--- a/compiler/semmagic.nim
+++ b/compiler/semmagic.nim
@@ -190,6 +190,9 @@ proc evalTypeTrait(c: PContext; traitCall: PNode, operand: PType, context: PSym)
       arg = arg.base.skipTypes(skippedTypes + {tyGenericInst})
       if not rec: break
     result = getTypeDescNode(c, arg, operand.owner, traitCall.info)
+  of "skipRanges":
+    var arg = operand.skipTypes({tyRange})
+    result = getTypeDescNode(c, arg, operand.owner, traitCall.info)
   else:
     localError(c.config, traitCall.info, "unknown trait: " & s)
     result = newNodeI(nkEmpty, traitCall.info)