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

Assertion failure because we don't handle polymorphic parameters in collect_unknown_apply_args #2891

Open
lpw25 opened this issue Aug 5, 2024 · 0 comments
Labels

Comments

@lpw25
Copy link
Collaborator

lpw25 commented Aug 5, 2024

Whilst reviewing the modular explicits PR I noticed that it was possible to cause an assertion failure that I previously thought could not be reached. The following code causes the issue:

let foo f a =
  let _ = (f ~a : ('a. 'a -> 'a) -> int) in
  f ~a (fun x -> x)

This code causes us to reach the collect_unkown_apply_args code with an expected type that has a polymorphic parameter. We should extend the code to support such cases. The new cases should always consider the type information to be non-principal.

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

No branches or pull requests

2 participants