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
Regression with -principal type inference #6922
Comments
Comment author: @garrigue You should probably report this first to the authors of Oni: a released package should never use -warn-error A, as this may break when warnings become stricter. |
Comment author: jhw Jacques, I am the author of the Oni package. The release configuration of the package doesn't use -warn-error A or -principle. Only the debug configuration does. I have a patch that works around the problem I'm reporting at the cost of losing the generality afforded by polymorphic methods, I'm hoping to discover that I won't need it because this problem turns out indeed to be a regression in 4.03. On the other hand, it may turn out that 4.03 actually has an improved type checker and my previously logic should never have been accepted when -principle is used. I'm interested to know which it will be. |
Comment author: @garrigue Can you provide a shorter repro case? |
Comment author: jhw I haven't forgotten about this. Just gotten busy with mundane seasonal distractions. |
Comment author: jhw I was able to work around this problem in the release of Oni 1.0.12 with the following commit. I'm not sure if the workaround should be necessary. https://bitbucket.org/jhw/oni/commits/ac4738c26d52228db1c69382d5ef1842db9d0b3b |
Comment author: @garrigue Still waiting to see whether this is really a regression or not. |
Comment author: jhw Uploaded a test file. Work around is commented out. $ ocamlc -principal -warn-error A -i -c type_error.ml |
Comment author: @garrigue Apparently, inherited methods are not properly marked as known. Here is a lighter workaround for now : in basic_agent, add
|
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Apparently this was solved by #8955. |
Original bug ID: 6922
Reporter: jhw
Assigned to: @garrigue
Status: assigned (set by jhw on 2017-04-06T19:54:52Z)
Resolution: open
Priority: normal
Severity: minor
Version: 4.03.0+dev / +beta1
Category: typing
Bug description
Regression with -principal type inference.
Steps to reproduce
Compile the debug configuration of v1.0.11 of the Oni package, which uses -principal and -warn-error A. With OCaml 4.02, this succeeds. With current 4.03+trunk, this fails because of "type not principal" warnings (errors) in Cf_journal and Cf_gadget.
Additional information
The source code for the Oni package is on Bitbucket at https://bitbucket.org/jhw/oni.
File attachments
The text was updated successfully, but these errors were encountered: