Skip to content

Improve defn.PolyFunctionOf extractor #18442

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

Conversation

nicolasstucki
Copy link
Contributor

  • Only match RefinedType representing the PolyFunction. This will allow us to use derivedRefinedType on the function type.
  • Only match the refinement if it is a MethodOrPoly. ExprType is not a valid PolyFunction refinement.
  • Remove dealias in PolyFunctionOf extractor. There was only one case where this was necessary and it added unnecessary overhead.

* Only match `RefinedType` representing the `PolyFunction`. This will
  allow us to use `derivedRefinedType` on the function type.
* Only match the refinement if it is a `MethodOrPoly`. `ExprType` is not
  a valid `PolyFunction` refinement.
* Remove `dealias` in `PolyFunctionOf` extractor. There was only one
  case where this was necessary and it added unnecessary overhead.
@nicolasstucki nicolasstucki marked this pull request as ready for review August 23, 2023 09:18
@nicolasstucki nicolasstucki requested a review from odersky August 24, 2023 19:00
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.

LGTM

@odersky odersky merged commit b0a3dd9 into scala:main Aug 30, 2023
@odersky odersky deleted the improve-defn.PolyFunctionOf-extractor branch August 30, 2023 06:14
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
WojciechMazur added a commit that referenced this pull request Jun 20, 2024
Backports #18442 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
WojciechMazur added a commit that referenced this pull request Jun 20, 2024
Backports #18442 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
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