We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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: 6870 Reporter: @stedolan Assigned to: @garrigue Status: closed (set by @xavierleroy on 2016-12-07T10:49:21Z) Resolution: fixed Priority: normal Severity: minor Version: 4.02.1 Fixed in version: 4.02.2+dev / +rc1 Category: typing Child of: #5343 Monitored by: @gasche @yallop
OCaml 4.02.1 correctly rejects this dubious definition of a possibly non-contractive recursive type:
module type T = sig type 'a t end module Fix (T : T) = struct type r = r T.t end
However, it accepts the following equivalent definition:
module Fix (T : T) = struct type r = ('r T.t) as 'r end
I think this is substantially the same issue as #5343. For a concrete example of how this leads to a segfault, see:
https://gist.github.com/stedolan/b5fe862fd350110ffa8e
The text was updated successfully, but these errors were encountered:
Comment author: @garrigue
Indeed, one must fix the occur check too...
Fixed in trunk and 4.02 at revisions 16122 and 16123.
Sorry, something went wrong.
Comment author: @gasche
It seems that you didn't commit the .reference file; at least the test pr6870_bad fails in the testsuite.
This is an ok/bad test. There is no need for a reference file. On my machine, the test succeeds (i.e. compilation causes an error).
Had just committed in the testsuite directory... Really fixed at revision 16126.
garrigue
No branches or pull requests
Original bug ID: 6870
Reporter: @stedolan
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2016-12-07T10:49:21Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.1
Fixed in version: 4.02.2+dev / +rc1
Category: typing
Child of: #5343
Monitored by: @gasche @yallop
Bug description
OCaml 4.02.1 correctly rejects this dubious definition of a possibly non-contractive recursive type:
However, it accepts the following equivalent definition:
I think this is substantially the same issue as #5343. For a concrete example of how this leads to a segfault, see:
The text was updated successfully, but these errors were encountered: