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

State all known limitations of right-associative extension methods #19210

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Dec 6, 2023

[skip test]
[skip test_windows_fast]
[skip test_sbt]
[skip community_build]
[skip mima]

@nicolasstucki nicolasstucki force-pushed the improve-right-associative-extension-methods-docs branch 2 times, most recently from b8ffad2 to 26e0d88 Compare December 6, 2023 09:43
@nicolasstucki nicolasstucki force-pushed the improve-right-associative-extension-methods-docs branch from 26e0d88 to b970344 Compare December 6, 2023 09:46
@nicolasstucki
Copy link
Contributor Author

Note that all limitations can be fixed with #19203

extension (x: Int)
def *:[T](xs: List[T]): List[T] = ...

xs.*:[Int](1) // error when trying to set T explicitly
Copy link
Member

@bishabosha bishabosha Dec 7, 2023

Choose a reason for hiding this comment

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

this still works:

*:[Int](xs)(1)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I only stated the cases that do not.

Copy link
Member

Choose a reason for hiding this comment

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

right, but you state that its "impossible" - but it is possible, just not how might be expected

@bishabosha bishabosha merged commit 97e4401 into scala:main Dec 12, 2023
19 checks passed
@bishabosha bishabosha deleted the improve-right-associative-extension-methods-docs branch December 12, 2023 15:44
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
WojciechMazur added a commit that referenced this pull request Jun 26, 2024
…methods" to LTS (#20797)

Backports #19210 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