summary refs log tree commit diff stats
path: root/compiler/jsgen.nim
diff options
context:
space:
mode:
authorDanil Yarantsev <tiberiumk12@gmail.com>2020-06-06 10:31:19 +0300
committerGitHub <noreply@github.com>2020-06-06 09:31:19 +0200
commitb19ad22b90b920036fcc7752eca624e55a929cf3 (patch)
treee0a9fb60062f22439779597f492db3fcaab4fd5a /compiler/jsgen.nim
parent7cdf4702699b5de0e31e1139122aa0486fad24a9 (diff)
downloadNim-b19ad22b90b920036fcc7752eca624e55a929cf3.tar.gz
Fix #14570 (#14571)
* Fix #14570
Diffstat (limited to 'compiler/jsgen.nim')
-rw-r--r--compiler/jsgen.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index 6aacf818a..0410a7a55 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -1822,7 +1822,7 @@ proc genNewSeq(p: PProc, n: PNode) =
     x.rdLoc, y.rdLoc, createVar(p, t, false)])
 
 proc genOrd(p: PProc, n: PNode, r: var TCompRes) =
-  case skipTypes(n[1].typ, abstractVar).kind
+  case skipTypes(n[1].typ, abstractVar + abstractRange).kind
   of tyEnum, tyInt..tyUInt64, tyChar: gen(p, n[1], r)
   of tyBool: unaryExpr(p, n, r, "", "($1 ? 1:0)")
   else: internalError(p.config, n.info, "genOrd")