瀏覽代碼

also hold back on overload issue for now

Simon Krajewski 5 年之前
父節點
當前提交
de8699a48c
共有 2 個文件被更改,包括 1 次插入15 次删除
  1. 0 14
      src/typing/calls.ml
  2. 1 1
      tests/unit/src/unit/TestConstrainedMonomorphs.hx

+ 0 - 14
src/typing/calls.ml

@@ -294,17 +294,6 @@ let unify_field_call ctx fa el args ret p inline =
 	let rec loop candidates = match candidates with
 		| [] -> [],[]
 		| (t,cf) :: candidates ->
-			let unbound = DynArray.create () in
-			List.iter (fun (m,_) -> match m.tm_type with
-				| None ->
-					DynArray.add unbound m
-				| Some t ->
-					let rec loop t = match follow t with
-						| TMono m -> DynArray.add unbound m
-						| _ -> TFunctions.iter loop t
-					in
-					loop t
-			) ctx.monomorphs.perfunction;
 			begin try
 				let candidate = attempt_call t cf in
 				if ctx.com.config.pf_overload && is_overload then begin
@@ -313,9 +302,6 @@ let unify_field_call ctx fa el args ret p inline =
 				end else
 					[candidate],[]
 			with Error ((Call_error cerr as err),p) ->
-				DynArray.iter (fun m ->
-					if m.tm_type <> None then Monomorph.unbind m
-				) unbound;
 				maybe_raise_unknown_ident cerr p;
 				let candidates,failures = loop candidates in
 				candidates,(cf,err,p) :: failures

+ 1 - 1
tests/unit/src/unit/TestConstrainedMonomorphs.hx

@@ -48,7 +48,7 @@ class TestConstrainedMonomorphs extends Test {
 		eq("fooFOO", infer(new MyNotString("foo")));
 	}
 
-	#if java
+	#if todo
 	function testDetectiveHaxe() {
 		var a = null;
 		eq("nullfoo", DetectiveHaxeExtern.itWasYou(a, "foo"));