Skip to content

More careful instantiation of type variables #12773

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

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

smarter
Copy link
Member

@smarter smarter commented Jun 9, 2021

Ensure that:

  • A type variable is only instantiated once.
  • A type variable instantiation is allowed given the current
    constraints. This required two changes:
    • In dropTransparentTrait, reset the constraints if we decide to keep
      the transparent traits.
    • Fix Type#simplify to preserve =:= (as its documentation indicate)
      when dealing with skolems.

@smarter smarter force-pushed the one-instantiation-3 branch from 41062dd to a023600 Compare June 9, 2021 13:35
Ensure that:
 - A type variable is only instantiated once.
 - A type variable instantiation is allowed given the current
   constraints. This required two changes:
   - In dropTransparentTrait, reset the constraints if we decide to keep
     the transparent traits.
   - Fix Type#simplify to preserve `=:=` (as its documentation indicate)
     when dealing with skolems.
@smarter smarter requested a review from odersky June 9, 2021 18:44
@smarter
Copy link
Member Author

smarter commented Jun 19, 2021

Ping for review.

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

These look all like very nice improvements.

@odersky odersky merged commit 239ad82 into scala:master Jun 24, 2021
@odersky odersky deleted the one-instantiation-3 branch June 24, 2021 13:14
@Kordyjan Kordyjan added this to the 3.0.2 milestone Aug 2, 2023
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