Răsfoiți Sursa

fixed broken overloads

Nicolas Cannasse 13 ani în urmă
părinte
comite
0252dc0cbe
1 a modificat fișierele cu 8 adăugiri și 1 ștergeri
  1. 8 1
      typer.ml

+ 8 - 1
typer.ml

@@ -2247,7 +2247,14 @@ and build_call ctx acc el twith p =
 	| AKExpr e | AKField (e,_) ->
 		let el , t, e = (match follow e.etype with
 		| TFun (args,r) ->
-			let fopts = (match acc with AKField (e,f) -> (match follow e.etype with TInst (c,pl) -> Some (c,pl,f) | _ -> None) | _ -> None) in
+			let fopts = (match acc with 
+				| AKField (e,f) ->
+					(match e.eexpr with 
+					| TField (e,_) -> (match follow e.etype with TInst (c,pl) -> Some (c,pl,f) | TAnon a -> (match !(a.a_status) with Statics c -> Some (c,[],f) | _ -> None) | _ -> None) 
+					| _ -> None)
+				| _ ->
+					None
+			) in
 			let el, tfunc = unify_call_params ctx fopts el args r p false in
 			el,(match tfunc with TFun(_,r) -> r | _ -> assert false), {e with etype = tfunc}
 		| TMono _ ->