Forráskód Böngészése

Revert "propagate constraints when binding mono to mono (#10198)"

This reverts commit 46f7d872c9fdcbed9f064e169b763dfd9848529d.
Aleksandr Kuzmenko 4 éve
szülő
commit
ed16c9acba

+ 0 - 3
src/core/tUnification.ml

@@ -165,9 +165,6 @@ module Monomorph = struct
 			if m != m2 then begin match m2.tm_type with
 			| None ->
 				List.iter (fun constr -> m2.tm_constraints <- constr :: m2.tm_constraints) m.tm_constraints;
-				(* If the monomorph we're binding to has other yet unbound monomorphs, constrain them to our target type (issue #9640) .*)
-				let mono_constraints,_ = classify_constraints' m in
-				List.iter (fun m3 -> constrain_to_type m3 None t) mono_constraints;
 				do_bind m t;
 			| Some t ->
 				bind m t

+ 0 - 11
tests/misc/projects/Issue10198/Main.hx

@@ -1,11 +0,0 @@
-class Main {
-	static public function fn1<T1,R1:T1>(v:R1):T1
-		return null;
-
-	static public function fn2<T2,R2:T2>(v:R2):T2
-		return null;
-
-	static function main() {
-		var b:Int = fn1(fn2('s'));
-	}
-}

+ 0 - 1
tests/misc/projects/Issue10198/compile-fail.hxml

@@ -1 +0,0 @@
---main Main

+ 0 - 1
tests/misc/projects/Issue10198/compile-fail.hxml.stderr

@@ -1 +0,0 @@
-Main.hx:9: characters 3-29 : Int should be String