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
Original bug ID: 6465 Reporter: @garrigue Assigned to: @garrigue Status: closed (set by @xavierleroy on 2016-12-07T10:47:11Z) Resolution: fixed Priority: normal Severity: minor Version: 4.02.0+dev Target version: 4.02.2+dev / +rc1 Fixed in version: 4.03.0+dev / +beta1 Category: typing Tags: patch
Assuming: module M = struct type t = A module B = struct type u = B end end;;
the following fails: module P : sig type t = M.t = A module B = M.B end = M;;
wheras this works: module P : sig type t = M.t = A module B = M.B end = struct include M end;;
Clearly one would expect the type of M to be a subtype of that of struct include M end.
The text was updated successfully, but these errors were encountered:
Comment author: @garrigue
Added a preliminary patch, but it does not pass all tests yet (a problem with recursive modules).
Sorry, something went wrong.
Updated the patch. Now all tests in the typing testsuite go through.
Does the new target mean that I should merge the patch in the 4.02 branch now? (Sorry, I've been busy with other things, and forgot to follow on this one...)
Merging will have to wait for later, as the current patch breaks camlp4.
Patch was merged in trunk at revision 15405.
garrigue
No branches or pull requests
Original bug ID: 6465
Reporter: @garrigue
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2016-12-07T10:47:11Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.0+dev
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.03.0+dev / +beta1
Category: typing
Tags: patch
Bug description
Assuming:
module M = struct type t = A module B = struct type u = B end end;;
the following fails:
module P : sig type t = M.t = A module B = M.B end = M;;
wheras this works:
module P : sig type t = M.t = A module B = M.B end = struct include M end;;
Clearly one would expect the type of M to be a subtype of that of struct include M end.
File attachments
The text was updated successfully, but these errors were encountered: