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

Refactor handling of rechecked types #22229

Merged
merged 2 commits into from
Dec 23, 2024
Merged

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Dec 17, 2024

  • Always store new types on rechecking
  • Store them in a hashmap which is associated with the rechecker of the current compilation unit
  • After rechecking is done, the map is forgotten, unless keepTypes is true. Under keepTypes, the map is kept in an attachment of the unit's root tree.

Change in nomenclature:

knownType --> nuType
rememberType --> setNuType
hasRememberedType --> hasNuType

 - Always store new types on rechecking
 - Store them in a hashmap which is associated with the rechecker of the
   current compilation unit
 - After rechecking is done, the map is forgotten, unless keepTypes is true.
   Under keepTypes, then map is kept in an attachment of the unit's root tree.

Change in nomenclature:

    knownType --> nuType
    rememberType --> setNuType
    hasRememberedType --> hasNuType
*/
def setupUnit(tree: Tree, recheckDef: DefRecheck)(using Context): Unit
Copy link
Member

@mbovel mbovel Dec 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could type DefRecheck be removed? It seemed it's not used anymore after this change.

@mbovel mbovel self-requested a review December 23, 2024 18:43
@odersky odersky merged commit 4d3f757 into scala:main Dec 23, 2024
30 checks passed
@odersky odersky deleted the change-knowntype branch December 23, 2024 20:27
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.

2 participants