Skip to content

Commit 625573a

Browse files
committed
Fix patch of #19798
This added a an override for the unapply method to fix the signature, but this method does not exist in the original library. We inline all calls to it to avoid any runtime calls to this new override. Fixes #19819
1 parent 9fe0111 commit 625573a

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153
run: ./project/scripts/sbt ";set ThisBuild/Build.scala2Library := Build.Scala2LibraryTasty ;scala3-bootstrapped/testCompilation i5; scala3-bootstrapped/testCompilation tests/run/typelevel-peano.scala; scala3-bootstrapped/testOnly dotty.tools.backend.jvm.DottyBytecodeTests" # only test a subset of test to avoid doubling the CI execution time
154154

155155
- name: Test with Scala 2 library with CC TASTy (fast)
156-
run: ./project/scripts/sbt ";set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty; scala2-library-cc/compile; scala2-library-cc-tasty/compile; scala3-bootstrapped/testCompilation i3"
156+
run: ./project/scripts/sbt ";set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty; scala2-library-cc/compile; scala2-library-cc-tasty/compile; scala3-bootstrapped/testCompilation i3; scala3-bootstrapped/testCompilation tests/run/i19819.scala"
157157

158158
test_scala2_library_tasty:
159159
runs-on: [self-hosted, Linux]

scala2-library-cc/src/scala/collection/SeqView.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ trait SeqView[+A] extends SeqViewOps[A, View, View[A]] with View[A] {
4848

4949
// Copied from SeqOps. This is needed due to the change of class hierarchy in stdlib.
5050
// See #19660.
51-
override def updated[B >: A](index: Int, elem: B): View[B]^{this} = {
51+
inline override def updated[B >: A](index: Int, elem: B): View[B]^{this} = {
5252
if(index < 0) throw new IndexOutOfBoundsException(index.toString)
5353
val k = knownSize
5454
if(k >= 0 && index >= k) throw new IndexOutOfBoundsException(index.toString)

tests/run/i19819.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@main def Test = Vector(1, 2, 3).view.updated(1, 8)

0 commit comments

Comments
 (0)