Skip to content

Conversation

@bishabosha
Copy link
Member

@bishaboshabishabosha 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

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

bishabosha commented Dec 11, 2025

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

[error] -- [E007] TypeMismatchError: .../library/src/scala/collection/package.scala:71:16 [error] 71|elseSome(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|inlinedef-> [B](y: B): (A, B) = (self, y) [error] |^^^^^^^^^ [error] --------------------------------------------------------------------------- [error] | [error] | longer explanation available when compiling with`-explain`

@GedochaoGedochao added the stat:feature freeze Issues and PRs waiting for the feature freeze to be lifted. label Dec 11, 2025
@bishaboshabishaboshaforce-pushed the feat/inlined-arrow-assoc branch from 73da792 to e62b7aeCompareDecember 11, 2025 10:00

// extension method sugar ---------------------------------------------
extension[A] (self: A)
transparentinlinedef-> [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
MemberAuthor

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.
@bishaboshabishaboshaforce-pushed the feat/inlined-arrow-assoc branch from 15b7d6c to 69e9222CompareDecember 11, 2025 17:28
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-minor-releaseThis PR cannot be merged until the next minor releasestat:blockedstat:feature freezeIssues 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

@bishabosha@sjrd@Gedochao