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

Assertion failed in Typecore.expand_path #6394

vicuna opened this issue May 5, 2014 · 1 comment


None yet
2 participants
Copy link

commented May 5, 2014

Original bug ID: 6394
Reporter: @alainfrisch
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2015-12-11T18:26:50Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.02.0+dev
Category: typing

Bug description

It is possible to reach the "assert false" in Typecore.expand_path with the following code:

module rec X : sig
type t = int * bool
end = struct
type t = A | B
let f = function A | B -> 0

Returning the "p" argument instead of failure seems to fix the problem, but I'd prefer if someone more knowledgeable could confirm this is the right fix.


This comment has been minimized.

Copy link

commented May 7, 2014

Comment author: @garrigue

Fixed as suggested in trunk at revision 14757.

I scratched my head a while to understand what is happening:
we are expanding the path of a datatype, so if the environment
is correctly constructed, it can only be a datatype (or an abstract
type is some file is missing).
However, recursive modules may break this invariant by adding
an incoherent equation, which will be detected later.

@vicuna vicuna closed this Dec 11, 2015

@vicuna vicuna added the typing label Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.