-
Notifications
You must be signed in to change notification settings - Fork 1.1k
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Destructive substitution regression #7905
Comments
Comment author: @Octachron As far as I can see, this is a local substitution, a new feature of 4.08? Your code example results in a syntax error with 4.07. Nevertheless, the error message might fall in an unfortunate local minimum: rewriting the local substitution to type t := A.t = A of A.t yields: 5 | type t := A.t = A of A.t |
Comment author: @nojb Indeed, you are right, I got confused -- sorry for the noise! |
Comment author: @gasche octachron, is the behavior you spotted a bug? The message you have (for the intuitively "correct" definition) looks like a parsing-error message delayed to type-checking time (I'm fine with this, but we may move it back to the parser one day if it has proper error messages), but the error of nojebar suggests that type-checking happens before the construction is rejected. Does it mean that the not-allowed rejection happens too late in the pipeline? |
Comment author: @Octachron It does look like the rejection happens too late. |
Comment author: @trefis https://github.com/ocaml/ocaml/blob/trunk/typing/typemod.ml#L1171 Feel free to move the code checking the shape of the declarations before the actual type-checking part. |
Comment author: @Octachron The error message should be improved with #2230 . So thanks for the report nojebar! |
Original bug ID: 7905
Reporter: @nojb
Assigned to: @Octachron
Status: resolved (set by @Octachron on 2019-01-31T20:17:53Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.08.0+dev/beta1/beta2
Category: typing
Monitored by: @yallop
Bug description
The following is accepted in 4.07, but rejected in 4.08.
The text was updated successfully, but these errors were encountered: