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

Assert_failure in <typing/typedecl.ml> #8360

Closed
vicuna opened this issue Nov 4, 2003 · 2 comments
Closed

Assert_failure in <typing/typedecl.ml> #8360

vicuna opened this issue Nov 4, 2003 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 4, 2003

Original bug ID: 1918
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Damien Pous
Version: 3.07
OS: Debian/GNU Linux (testing/unstable)
Submission from: mailhost.ens-lsh.fr (193.51.131.2)

The following type declaration raise an Assert_failure exception
within the compiler (ocamlc, ocamlopt, toplevel) :

<<

type ('a, 'b) a = 'a -> unit constraint 'a = [> `B of ('a, 'b) b as 'b]

and ('a, 'b) b = 'b -> unit constraint 'b = [> `A of ('a, 'b) a as 'a];;
Fatal error: exception Assert_failure("typing/typedecl.ml", 317, 38)

this bug can also be trigered by the simpler but incorrect following type

<<

type 'a a = 'a constraint 'a = [> `B of 'b b as 'b]

and 'b b = 'b -> unit;;
Fatal error: exception Assert_failure("typing/typedecl.ml", 317, 38)

@vicuna
Copy link
Author

vicuna commented Nov 7, 2003

Comment author: administrator

Fixed by Jacques in typedecl.ml (2003-11-07)

@vicuna vicuna closed this as completed Nov 7, 2003
@vicuna
Copy link
Author

vicuna commented Nov 7, 2003

Comment author: administrator

From: Damien.Pous@ens-lyon.fr

The following type declaration raise an Assert_failure exception
within the compiler (ocamlc, ocamlopt, toplevel) :

<<

type ('a, 'b) a = 'a -> unit constraint 'a = [> `B of ('a, 'b) b as 'b]

and ('a, 'b) b = 'b -> unit constraint 'b = [> `A of ('a, 'b) a as 'a];;
Fatal error: exception Assert_failure("typing/typedecl.ml", 317, 38)

Indeed, this should rather produce a type error...

This is now fixed in CVS.

Jacques

@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant