Skip to content

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.

odersky added 5 commits March 7, 2020 10:28
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.

3 participants