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: 7070 Reporter: @lpw25 Assigned to: @lpw25 Status: resolved (set by @Octachron on 2017-07-27T20:43:42Z) Resolution: fixed Priority: low Severity: feature Target version: undecided Fixed in version: 4.06.0 +dev/beta1/beta2/rc1 Category: typing Monitored by: @hcarty
The following .ml file:
let r = ref []
let r = 0
gives the error message:
File "foo.ml", line 2, characters 8-14: Error: The type of this expression, '_a list ref, contains type variables that cannot be generalized
even though the offending value has been shadowed and so cannot cause any problems.
I think that check_nongen_scheme should probably be run on the simplified signature rather than the original signature.
check_nongen_scheme
The text was updated successfully, but these errors were encountered:
Comment author: @alainfrisch
Are there cases where the error you suggest to avoid is not actually related to a defect in the code (in your case, an unused declaration)?
Sorry, something went wrong.
Not sure this qualifies as a bug, so downgrading to "feature".
Comment author: @lpw25
Pull request:
#1139
Comment author: @Octachron
Fixed by merging the above PR.
lpw25
No branches or pull requests
Original bug ID: 7070
Reporter: @lpw25
Assigned to: @lpw25
Status: resolved (set by @Octachron on 2017-07-27T20:43:42Z)
Resolution: fixed
Priority: low
Severity: feature
Target version: undecided
Fixed in version: 4.06.0 +dev/beta1/beta2/rc1
Category: typing
Monitored by: @hcarty
Bug description
The following .ml file:
let r = ref []
let r = 0
gives the error message:
File "foo.ml", line 2, characters 8-14:
Error: The type of this expression, '_a list ref,
contains type variables that cannot be generalized
even though the offending value has been shadowed and so cannot cause any problems.
I think that
check_nongen_scheme
should probably be run on the simplified signature rather than the original signature.The text was updated successfully, but these errors were encountered: