summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2017-10-07 22:17:16 +0300
committerAraq <rumpf_a@web.de>2017-12-21 11:06:36 +0100
commit057d5789ba6cf7e1f0cef681ffba77b0c4788110 (patch)
tree847aeb3ca7418792af594ff209f9641de0c3dfeb /compiler
parent70380882c54a6eea08c715b015399673b55e9bc0 (diff)
downloadNim-057d5789ba6cf7e1f0cef681ffba77b0c4788110.tar.gz
fix #6277
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgexprs.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index dd526c5fb..da92b281e 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -849,7 +849,7 @@ proc genArrayElem(p: BProc, n, x, y: PNode, d: var TLoc) =
   var a, b: TLoc
   initLocExpr(p, x, a)
   initLocExpr(p, y, b)
-  var ty = skipTypes(skipTypes(a.t, abstractVarRange), abstractPtrs)
+  var ty = skipTypes(a.t, abstractVarRange + abstractPtrs + tyUserTypeClasses)
   var first = intLiteral(firstOrd(ty))
   # emit range check:
   if optBoundsCheck in p.options and tfUncheckedArray notin ty.flags: