-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flambda-backend: Fix bug around coerce and modes (#3122)
* Add failing test * Don't squeeze out variable in closed_type_expr
- Loading branch information
1 parent
3626287
commit b2d6315
Showing
2 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(* TEST | ||
expect; | ||
*) | ||
|
||
(* We must put this in a module to stop the top-level from squeezing out | ||
unconstrained mode variables *) | ||
|
||
module M = struct | ||
let f = fun _ -> () | ||
|
||
let _ = (f :> 'a -> unit) | ||
|
||
let _ = f (local_ 42.0) | ||
end | ||
|
||
[%%expect{| | ||
module M : sig val f : local_ 'a -> unit end | ||
|}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters