From babc9b234d0627b9788490fd165cb87fc1c97ba1 Mon Sep 17 00:00:00 2001 From: Jason Beetham Date: Fri, 17 Mar 2023 03:17:08 -0600 Subject: [PATCH] Made generic type classes work with types using static parameters (#21528) (cherry picked from commit a9d0124b5d6e75df708497fc288d602bb2585369) --- compiler/semtypinst.nim | 27 +++++++++++++++--- tests/metatype/tstatic_generic_typeclass.nim | 30 ++++++++++++++++++++ 2 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 tests/metatype/tstatic_generic_typeclass.nim diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 5d300fc589..c2bf3539c9 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -190,6 +190,24 @@ proc replaceObjBranches(cl: TReplTypeVars, n: PNode): PNode = for i in 0..