Skip to content
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

polymorphism + phantom types regression #7395

Closed
vicuna opened this issue Oct 27, 2016 · 2 comments
Closed

polymorphism + phantom types regression #7395

vicuna opened this issue Oct 27, 2016 · 2 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Oct 27, 2016

Original bug ID: 7395
Reporter: @nojb
Assigned to: @garrigue
Status: resolved (set by @garrigue on 2016-10-27T21:11:06Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.04.0 +dev / +beta1 / +beta2
Category: typing
Child of: #7391

Bug description

Commit 9a2015 seems caused a small regression in the typechecker:

type u
type 'a t = u
let c (f : u -> u) =
object
method apply: 'a. 'a t -> 'a t = fun x -> f x
end

no longer typechecks. To fix it is enough to add some type annotation:

...
method apply: 'a. 'a t -> 'a t = fun x -> (f : u -> u) x
...

@vicuna
Copy link
Author

vicuna commented Oct 27, 2016

Comment author: @garrigue

Fixed by commit 611bb8c.

Just reverted 9a2015, which is no longer needed.

@vicuna vicuna closed this as completed Oct 27, 2016
@vicuna
Copy link
Author

vicuna commented Oct 28, 2016

Comment author: @nojb

It works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants