Created
August 31, 2015 05:26
-
-
Save mjambon/e90d15ab740f632efd73 to your computer and use it in GitHub Desktop.
Record field disambiguation fail
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
type t1 = { x: int; y: int } | |
type t2 = { x: int; z: int } | |
let f () = { x = 1; y = 0 } | |
(* no error *) | |
let () = | |
f () |> fun x -> | |
ignore x.x; | |
ignore x.y | |
let wrap f x = f x | |
(* type error *) | |
let () = | |
f () |> wrap (fun x -> | |
ignore x.x; | |
ignore x.y | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment