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

Unclear error message in 4.01.0 #6295

Closed
vicuna opened this issue Jan 16, 2014 · 1 comment
Closed

Unclear error message in 4.01.0 #6295

vicuna opened this issue Jan 16, 2014 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Jan 16, 2014

Original bug ID: 6295
Reporter: @dbuenzli
Status: closed (set by @gasche on 2014-01-17T09:03:08Z)
Resolution: duplicate
Priority: normal
Severity: minor
Version: 4.01.0
Category: ~DO NOT USE (was: OCaml general)
Duplicate of: #6173
Monitored by: @hcarty @dbuenzli

Bug description

For the following (wrong) code,

> opam-switch-eval 4.01.0
> ocaml
        OCaml version 4.01.0

#  let _ = 
      try 
        while true do if true then raise Exit done
      with Exit -> 1 :: []
    ;;
Error: The variant type unit has no constructor ::

the error message was much clearer in 4.00.1:

> opam-switch-eval 4.00.1
> ocaml
        OCaml version 4.00.1
# let _ = 
    try 
      while true do if true then raise Exit done
    with Exit -> 1 :: []
  ;;
Error: This expression has type 'a list
       but an expression was expected of type unit
@vicuna
Copy link
Author

vicuna commented Jan 17, 2014

Comment author: @gasche

I'll close this one to centralize discussion in the other report on the same issue.

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