Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Jan 15, 2026

  • Drop ToResultInResults
  • Move its functionality to separate methods in Setup
  • Implement dealias suppression logic for capset arguments.
    This is needed to be able to express referring with fresh to enclosing method types
    that don't immediately have the type containing the fresh as their result type.

Based on #24923

Also, LocalCaps are no longer described as "fresh" in error messages.
 - Introduce `fresh`

    - New global definition: `caps.fresh`.
    - `fresh` is for ResultCaps in function types.
    - Disallow `fresh` outside result types of function types.

 - Fix isTrackableRef: previously, a static term ref was trackable if its prefix was the ThisType
   of a package, but was not trackable if the prefix was a TermRef to the same package.
   Now both versions are trackable.

 - Don't go to basetypes when comparing dependent functions at cc

 - Improve printing of capabilities:

    - Don't elide a universal capture set in a TypeMismatch message if one of its capabilities is mentioned
      in an error note.
    - Don't elide capture sets containing fresh when printing
    - Don't use the verbose output for fresh if there are no open existentials
    - Systematically backquote all entities shown as capabilities
@odersky odersky requested a review from a team as a code owner January 15, 2026 16:30
@odersky odersky changed the title Fix fresh setup Make TypeMaps in Setup work correctly for fresh Jan 15, 2026
 - Drop ToResultInResults
 - Move its functionality to separate methods in Setup
 - Implement dealias suppression logic for capset arguments.
   This is needed to be able to express referring with `fresh` to enclosing method types
   that don't immediately have the type containing the `fresh` as their result type.
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.

1 participant