-
Notifications
You must be signed in to change notification settings - Fork 1
Comparing changes
Open a pull request
base repository: scala/scala3-lts
base: lts-3.3
head repository: scala/scala3-lts
compare: backport-lts-3.3-23757
- 15 commits
- 38 files changed
- 10 contributors
Commits on Sep 26, 2025
-
Configuration menu - View commit details
-
Copy full SHA for b3d8ef3 - Browse repository at this point
Copy the full SHA b3d8ef3View commit details -
Move makePackageObjPrefixExplicit to TypeUtils
[Cherry-picked f9145d7][modified]
Configuration menu - View commit details
-
Copy full SHA for c08bf10 - Browse repository at this point
Copy the full SHA c08bf10View commit details -
Fix pkg obj prefix of opaque tp ext meth
There is use of `makePackageObjPrefixExplicit` within `accessibleType`, which is called on the result of findRef in typedIdent. But in `tryExtension` it's no such use. We could fix it in the usage of the results in `tryExtension`, but I thought perhaps we could fix it for all call sites, by handling it within findRef. [Cherry-picked 7db83c5]
Configuration menu - View commit details
-
Copy full SHA for a706a86 - Browse repository at this point
Copy the full SHA a706a86View commit details -
Add addendum to
private val
parameter variance error message[Cherry-picked e6c474d]
Configuration menu - View commit details
-
Copy full SHA for f94a33e - Browse repository at this point
Copy the full SHA f94a33eView commit details -
fix: correctly require a
ClassTag
when building a multidimensional ……`Array` [Cherry-picked 9da1fcb]
Configuration menu - View commit details
-
Copy full SHA for abc370b - Browse repository at this point
Copy the full SHA abc370bView commit details -
Porting XRayModeHints (scala#23891)
Porting scalameta/metals#7639 Co-authored-by: Henry Parker <[email protected]> [Cherry-picked 1315eda]
Configuration menu - View commit details
-
Copy full SHA for 992cb05 - Browse repository at this point
Copy the full SHA 992cb05View commit details -
Improve symbol order in completions provided by the presentation comp…
…iler (scala#23888) Extension methods that are not in the same file are placed after all Product methods and even after extension methods like "ensuring". This PR penalizes the following methods, so that they are no longer at the top of the suggestions: - scala.Product.* - scala.Equals.* - scala.Predef.ArrowAssoc.* - scala.Predef.Ensuring.* - scala.Predef.StringFormat.* - scala.Predef.nn - scala.Predef.runtimeChecked Resolves scalameta/metals#7642
Configuration menu - View commit details
-
Copy full SHA for 920500a - Browse repository at this point
Copy the full SHA 920500aView commit details -
Improve symbol order in completions provided by the presentation comp…
…iler (scala#23888) Extension methods that are not in the same file are placed after all Product methods and even after extension methods like "ensuring". This PR penalizes the following methods, so that they are no longer at the top of the suggestions: - scala.Product.* - scala.Equals.* - scala.Predef.ArrowAssoc.* - scala.Predef.Ensuring.* - scala.Predef.StringFormat.* - scala.Predef.nn - scala.Predef.runtimeChecked Resolves scalameta/metals#7642 [Cherry-picked 7d27633][modified]
Configuration menu - View commit details
-
Copy full SHA for 6e45d24 - Browse repository at this point
Copy the full SHA 6e45d24View commit details -
fix: make vals created in desugaring of n-ary lambdas non-synthetic (s…
…cala#23896) resolves: scala#16110 resolves: scalameta/metals#7594 [Cherry-picked 5f470ea]
Configuration menu - View commit details
-
Copy full SHA for 90c0cb6 - Browse repository at this point
Copy the full SHA 90c0cb6View commit details -
Prevent opaque types leaking from transparent inline methods
Before this PR, every transparent inline call returning an opaque type would actually be typed with an intersection type `DECLARED & ACTUAL`, where `DECLARED` was the declared return type of the transparent method, and `ACTUAL` was the type actually returned in the expansion, with every opaque type alias then dealiased. There was no way to guard against this dealiasing. With the changes in this PR, users are now able to manually ensure that they receive the types they want, although they might have to manually annotate the returned type inside of the transparent inline method body (as described in the added documentation section). The previous dealiasing was caused by the proxy mechanism in inlining, which would effectively deals every opaque type, that is transparent from the perspective of the original method declaration. Now, we try to map the results of the transparent inline back to the original (opaque) types. However all of this is only true for the outermost transparent inline method calls. Nested calls will not be affected by this change. This is because the type checker in the original context of the method will see the opaque type as transparent (so it will type the rest of the method according to that), and that typing must still hold after inlining the method e.g.: ``` object Time: opaque type Time = String transparent inline makeTime(): Time = "1h" transparent inline listTime(): List[Time] = List[String](makeTime()) // mapping the results of makeTime() back into opaque types outside // of the scope of Time will cause an inlining compilation error // (which we are generally trying to avoid, and which would be // considered a bug in the compiler). ``` This might cause the aliased type to still leak in a manner that may feel unexpected. In the above example, even if the List does not have an explicit type parameter, the type inference will still decide on `String`, causing any call to listTime to leak that type. This is also touched upon in the added docs. This PR might cause some source/library incompatibilities connected to the changed returned types (but I doubt it’s many, considering the additional required effort of ignoring type inference if we want the outputted type to be different).
Configuration menu - View commit details
-
Copy full SHA for b60ade9 - Browse repository at this point
Copy the full SHA b60ade9View commit details -
Prevent opaque types leaking from transparent inline methods
Before this PR, every transparent inline call returning an opaque type would actually be typed with an intersection type `DECLARED & ACTUAL`, where `DECLARED` was the declared return type of the transparent method, and `ACTUAL` was the type actually returned in the expansion, with every opaque type alias then dealiased. There was no way to guard against this dealiasing. With the changes in this PR, users are now able to manually ensure that they receive the types they want, although they might have to manually annotate the returned type inside of the transparent inline method body (as described in the added documentation section). The previous dealiasing was caused by the proxy mechanism in inlining, which would effectively deals every opaque type, that is transparent from the perspective of the original method declaration. Now, we try to map the results of the transparent inline back to the original (opaque) types. However all of this is only true for the outermost transparent inline method calls. Nested calls will not be affected by this change. This is because the type checker in the original context of the method will see the opaque type as transparent (so it will type the rest of the method according to that), and that typing must still hold after inlining the method e.g.: ``` object Time: opaque type Time = String transparent inline makeTime(): Time = "1h" transparent inline listTime(): List[Time] = List[String](makeTime()) // mapping the results of makeTime() back into opaque types outside // of the scope of Time will cause an inlining compilation error // (which we are generally trying to avoid, and which would be // considered a bug in the compiler). ``` This might cause the aliased type to still leak in a manner that may feel unexpected. In the above example, even if the List does not have an explicit type parameter, the type inference will still decide on `String`, causing any call to listTime to leak that type. This is also touched upon in the added docs. This PR might cause some source/library incompatibilities connected to the changed returned types (but I doubt it’s many, considering the additional required effort of ignoring type inference if we want the outputted type to be different). [Cherry-picked c6245ed][modified]
Configuration menu - View commit details
-
Copy full SHA for b1676da - Browse repository at this point
Copy the full SHA b1676daView commit details -
Certain macros could return nodes typed with incorrect ThisTypes, which would reference module types outside of their scope. We remap those problematic nodes to TermRefs pointing to objects, and then possibly manually cast the returned node to the remapped type, as the ensureConforms method would just leave the previous incorrect type after confirming that the remapped type is a subtype of the previous incorrect one. [Cherry-picked 6771a79]
Configuration menu - View commit details
-
Copy full SHA for 8efbdcd - Browse repository at this point
Copy the full SHA 8efbdcdView commit details -
[Cherry-picked e611110]
Configuration menu - View commit details
-
Copy full SHA for 74aafdc - Browse repository at this point
Copy the full SHA 74aafdcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61cdcae - Browse repository at this point
Copy the full SHA 61cdcaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4de57e7 - Browse repository at this point
Copy the full SHA 4de57e7View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff lts-3.3...backport-lts-3.3-23757