diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index 12ba07c54a..749f9541a5 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -1023,7 +1023,7 @@ proc genCaseJS(p: PProc, n: PNode, r: var TCompRes) = a, b, cond, stmt: TCompRes = default(TCompRes) genLineDir(p, n) gen(p, n[0], cond) - let typeKind = skipTypes(n[0].typ, abstractVar).kind + let typeKind = skipTypes(n[0].typ, abstractVar+{tyRange}).kind var transferRange = false let anyString = typeKind in {tyString, tyCstring} case typeKind