Skip to content

Commit 7ba8e17

Browse files
committed
don't bind but do_bind
closes #12050
1 parent 651a81d commit 7ba8e17

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

src/typing/matcher/exprToPattern.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ let unapply_type_parameters params monos =
3333
match t2,follow t2 with
3434
| TMono m1,TMono m2 ->
3535
unapplied := (m1,m1.tm_type) :: !unapplied;
36-
Monomorph.bind m1 tp1.ttp_type;
36+
Monomorph.do_bind m1 tp1.ttp_type;
3737
| _ -> ()
3838
) params monos;
3939
!unapplied
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function main() {}
2+
3+
function toString<T>(status:BroadcastStatus<T>)
4+
return switch status {
5+
case NotAvailable: 'NotAvailable';
6+
}
7+
8+
interface MediaDevice {}
9+
10+
enum BroadcastStatus<T:MediaDevice> {
11+
NotAvailable;
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--main Main
2+
--interp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Main.hx:3: characters 45-46 : Constraint check failure for BroadcastStatus.T
2+
Main.hx:3: characters 45-46 : ... toString.T should be MediaDevice

0 commit comments

Comments
 (0)