Pārlūkot izejas kodu

fix typing of `@:structInit` constructor calls

Simon Krajewski 9 gadi atpakaļ
vecāks
revīzija
1eaddd83f2
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/typing/typer.ml

+ 2 - 2
src/typing/typer.ml

@@ -3052,8 +3052,8 @@ and type_object_decl ctx fl with_type p =
 		let t, fl = type_fields a.a_fields in
 		mk (TObjectDecl fl) t p
 	| ODKWithClass (c,tl) ->
-		let _,ctor = get_constructor ctx c tl p in
-		let args = match follow ctor.cf_type with
+		let t,ctor = get_constructor ctx c tl p in
+		let args = match follow t with
 			| TFun(args,_) -> args
 			| _ -> assert false
 		in