Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing wording in error message #6117

Closed
vicuna opened this issue Aug 4, 2013 · 1 comment
Closed

Confusing wording in error message #6117

vicuna opened this issue Aug 4, 2013 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Aug 4, 2013

Original bug ID: 6117
Reporter: goswin
Status: closed (set by @xavierleroy on 2015-12-11T18:21:25Z)
Resolution: fixed
Priority: normal
Severity: minor
Platform: linux
OS: debian
OS Version: experimental
Version: 4.00.1
Fixed in version: 4.01.0+dev
Category: typing
Duplicate of: #5782

Bug description

A type error with a record uses the confusing phrase "labels of type unit",

Steps to reproduce

type r = { foo : int };;

type r = { foo : int; }

let _ = ({ foo = 1; } : unit);;

Error: The record field label foo belongs to the type r
but is mixed here with labels of type unit

@vicuna
Copy link
Author

vicuna commented Aug 4, 2013

Comment author: @lpw25

This was fixed as part of the record disambiguation work:

      OCaml version 4.02.0+dev0-2013-06-13

type r = { foo : int };;

type r = { foo : int; }

let _ = ({ foo = 1; } : unit);;

Characters 9-21:
let _ = ({ foo = 1; } : unit);;
^^^^^^^^^^^^
Error: This expression has type r but an expression was expected of type unit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant