Skip to content

Conversation

@bishabosha
Copy link
Member

@bishabosha bishabosha commented Dec 11, 2025

Must wait for 3.10.0

currently it is transparent inline, to avoid inline proxy objects appearing in capture sets and breaking type checking.

fixes #24715

@bishabosha bishabosha added this to the 3.10.0 milestone Dec 11, 2025
@bishabosha bishabosha requested a review from a team as a code owner December 11, 2025 09:24
@bishabosha bishabosha added the needs-minor-release This PR cannot be merged until the next minor release label Dec 11, 2025
@bishabosha
Copy link
Member Author

bishabosha commented Dec 11, 2025

I made it transparent inline because this error shows up when only using inline: (see #24729)

[error] -- [E007] Type Mismatch Error: .../library/src/scala/collection/package.scala:71:16
[error]  71 |      else Some(t.head -> t.tail)
[error]     |                ^^^^^^^^^^^^^^^^
[error]     |      Found:    (A^'s1, C^{y$proxy1})
[error]     |      Required: (A, C)
[error]     |
[error]     |      Note that capability y$proxy1 is not included in capture set {}.
[error]     |---------------------------------------------------------------------------
[error]     |Inline stack trace
[error]     |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error]     |This location contains code that was inlined from Predef.scala:616
[error] 616 |    inline def -> [B](y: B): (A, B) = (self, y)
[error]     |                                      ^^^^^^^^^
[error]      ---------------------------------------------------------------------------
[error]     |
[error]     | longer explanation available when compiling with `-explain`

@Gedochao Gedochao added the stat:feature freeze Issues and PRs waiting for the feature freeze to be lifted. label Dec 11, 2025
@bishabosha bishabosha force-pushed the feat/inlined-arrow-assoc branch from 73da792 to e62b7ae Compare December 11, 2025 10:00

// extension method sugar ---------------------------------------------
extension[A] (self: A)
transparent inline def -> [B](y: B): (A, B) = (self, y)
Copy link
Member

Choose a reason for hiding this comment

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

This should really be a non-transparent. If it bothers CC, then CC must adapt.

Making this transparent inline has a huge cost in terms of compatibility guarantees. That should be avoided basically at all cost.

@bishabosha
Copy link
Member Author

bishabosha commented Dec 11, 2025

#24728 (comment) This should really be a non-transparent. If it bothers CC, then CC must adapt.

ok then lets say blocked by #24729

Must wait for 3.10.0

currently it is transparent inline, to avoid inline proxy objects appearing in capture sets and breaking type checking.
@bishabosha bishabosha force-pushed the feat/inlined-arrow-assoc branch from 15b7d6c to 69e9222 Compare December 11, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-minor-release This PR cannot be merged until the next minor release stat:blocked stat:feature freeze Issues and PRs waiting for the feature freeze to be lifted.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verbose bytecode generated for the creation of a single tuple via ->

3 participants