Jelajahi Sumber

[typer] fix bad follow

Simon Krajewski 6 tahun lalu
induk
melakukan
b95785c003
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      src/typing/typer.ml

+ 2 - 1
src/typing/typer.ml

@@ -1726,9 +1726,10 @@ and type_new ctx path el with_type force_inline p =
 	else try
 		ctx.call_argument_stack <- el :: ctx.call_argument_stack;
 		let t = Typeload.load_instance ctx path true in
+		let t_follow = follow t in
 		ctx.call_argument_stack <- List.tl ctx.call_argument_stack;
 		(* Try to properly build @:generic classes here (issue #2016) *)
-		begin match follow t with
+		begin match t_follow with
 			| TInst({cl_kind = KGeneric } as c,tl) -> follow (Generic.build_generic ctx c p tl)
 			| _ -> t
 		end