summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
diff options
context:
space:
mode:
authornc-x <neelesh.chandola@outlook.com>2022-04-30 19:28:58 +0530
committerGitHub <noreply@github.com>2022-04-30 15:58:58 +0200
commit4680ab61c06782d142492d1fcdebf8e942373c09 (patch)
treeae10c642fb85ff4e72be2b5d55d4aa19f0a8740b /compiler/semexprs.nim
parente4a2c2d474f725b01acfa3a6169686f5e16f2ce9 (diff)
downloadNim-4680ab61c06782d142492d1fcdebf8e942373c09.tar.gz
Fix fixAbstractType for user defined typeclasses, fixes #19730 & #18409 (#19732)
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r--compiler/semexprs.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index b8742ff65..ed28d8145 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -645,7 +645,7 @@ proc fixAbstractType(c: PContext, n: PNode) =
         skipTypes(it.typ, abstractVar).kind notin {tyOpenArray, tyVarargs}:
       if skipTypes(it[1].typ, abstractVar).kind in
             {tyNil, tyTuple, tySet} or it[1].isArrayConstr:
-        var s = skipTypes(it.typ, abstractVar)
+        var s = skipTypes(it.typ, abstractVar + tyUserTypeClasses)
         if s.kind != tyUntyped:
           changeType(c, it[1], s, check=true)
         n[i] = it[1]