Skip to content

Instantly share code, notes, and snippets.

@yaotti
Created November 29, 2009 10:41
Show Gist options
  • Save yaotti/244877 to your computer and use it in GitHub Desktop.
Save yaotti/244877 to your computer and use it in GitHub Desktop.
type student = { name: string; id: int };;
type hoge = { name: string; age: int };;
{ name = "hi"; id = 12 };;
(*
# type student = { name: string; id: int };;
type student = { name : string; id : int; }
# type hoge = { name: string; age: int };;
type hoge = { name : string; age : int; }
# { name = "hi"; id = 12 };;
Characters 0-24:
{ name = "hi"; id = 12 };;
^^^^^^^^^^^^^^^^^^^^^^^^
Error: The record field label id belongs to the type student
but is mixed here with labels of type hoge
*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment