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

Fix #5302: Check well-formedness of inferred types #8462

Merged
merged 8 commits into from Mar 12, 2020

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Mar 7, 2020

Check that type applications in inferred types are well-formed. This means:

  • kinds conform
  • arguments conform to bounds
  • higher-kinded type constructors are not applied to wildcard types

It turns out that we cannot guarantee that all inferred types are well-formed by construction. So this check is essential for soundness.

Named arguments of types are no longer supported, so this was dead code.
We sometimes got the wrong type symbol before, which gave a wring number of
arguments. Detected when starting to bounds checking inferred types.
Issue well-formed errors on well-formed trees only if there
are no other errors.
@odersky odersky changed the title Drop handling of named type arguments in checkAppliedType Fix #5302: Check well-formedness of inferred types Mar 7, 2020
@smarter smarter merged commit b64b8a9 into scala:master Mar 12, 2020
@smarter smarter deleted the fix-#5302 branch March 12, 2020 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants