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

Ctype.Unify(_) with associated functor args containing open PV/obj. type and open obj. type. #6981

Closed
vicuna opened this issue Sep 7, 2015 · 2 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Sep 7, 2015

Original bug ID: 6981
Reporter: labichn
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2017-02-16T14:16:27Z)
Resolution: fixed
Priority: normal
Severity: crash
Platform: x86_64
OS: Arch GNU/Linux
OS Version: 4.1.6-1
Version: 4.02.3
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: typing
Related to: #6513
Monitored by: @hcarty

Bug description

See steps to reproduce for minimal example.

The bug occurs in a functor with two parameters, where the first module Bar contains a private row type (either PV or open object) and the second module contains a private, open object type that refers to any type inside of Bar (not just the private row type).

I'm unsure of what the behavior should be (found this during some refactoring with stale code), but I imagine it's not a unification error:

Fatal error: exception Ctype.Unify(_)

I was able to reproduce this error for all compiler versions 4.00.1 and above. In 3.12.1 the error is formatted slightly differently:

Fatal error: exception Ctype.Unify(_, _)

Steps to reproduce

cat bug.ml
module type S =
sig
type a
type b
end
module Foo
(Bar : S with type a = private [> `A])
(Baz : S with type b = private < b : Bar.b ; .. >) =
struct
end
ocamlc bug.ml
Fatal error: exception Ctype.Unify(_)

@vicuna
Copy link
Author

vicuna commented Nov 27, 2015

Comment author: @alainfrisch

This is compiler crash -> bumping priority.

@vicuna
Copy link
Author

vicuna commented Nov 30, 2015

Comment author: @garrigue

Fixed in trunk by commit 20b59a3.

Same problem as #6513, but for structures. Should have been fixed then...

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

2 participants