Procházet zdrojové kódy

fix match_types wrt GenericVar

Jeremy Siek před 1 týdnem
rodič
revize
52e0725fcd
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      book.tex

+ 1 - 1
book.tex

@@ -23070,7 +23070,7 @@ def match_types(self, param_ty, arg_ty, deduced, e):
       else:
         deduced[id] = arg_ty
     case (AllType(ps, ty), AllType(arg_ps, arg_ty)):
-      rename = {ap:p for (ap,p) in zip(arg_ps, ps)}
+      rename = {ap: GenericVar(p) for (ap,p) in zip(arg_ps, ps)}
       new_arg_ty = self.substitute_type(arg_ty, rename)
       self.match_types(ty, new_arg_ty, deduced, e)
     case (TupleType(ps), TupleType(ts)):