Skip to content

Use level checking for Fresh instances #23101

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

odersky
Copy link
Contributor

@odersky odersky commented May 5, 2025

This is a WIP commit list that should in the end change the way we treat fresh instances. Instead of disallowing all of them when instantiating type parameters (as well as in a number of other situations), we allow them but check that inner fresh instances do not get widened to outer ones.

To get there, this commit stream also implements lots of improvements to error diagnostics.

  • We now disambiguate different instances of ^, cap, or =>.
  • We explain for each such instances what it represents exactly.
  • We also turn this on for override errors (not necessarily limited to capture checking).
@odersky odersky force-pushed the drop-disallow-fresh branch from 223b9c6 to 99a4c20 Compare May 5, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant