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

view.updated not a member of IndexedSeqView in CC library #19660

Closed
nicolasstucki opened this issue Feb 9, 2024 · 2 comments · Fixed by #19798
Closed

view.updated not a member of IndexedSeqView in CC library #19660

nicolasstucki opened this issue Feb 9, 2024 · 2 comments · Fixed by #19798
Assignees
Labels
area:experimental:cc Capture checking related itype:bug
Milestone

Comments

@nicolasstucki
Copy link
Contributor

Minimization of tests/run/t5328.scala

// Test.scala
def test = Vector(1).view.updated(0,2)
sbt> set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty
sbt> scala3-bootstrapped/scalac Test.scala
1 |def test = Vector(1).view.updated(0,2)
  |           ^^^^^^^^^^^^^^^^^^^^^^
  |     value updated is not a member of scala.collection.IndexedSeqView[Int]

Originally posted by @nicolasstucki in #19652 (comment)

@nicolasstucki nicolasstucki added itype:bug cc-experiment Intended to be merged with cc-experiment branch on origin area:experimental:cc Capture checking related labels Feb 9, 2024
@nicolasstucki nicolasstucki removed the cc-experiment Intended to be merged with cc-experiment branch on origin label Feb 9, 2024
@Linyxus
Copy link
Contributor

Linyxus commented Feb 21, 2024

So I checked the issue and discovered that this is actually not a bug in the capture checker and an outcome of a change made in the capture checked stdlib. In the original stdlib, the updated function of IndexedSeqView comes from the SeqOps trait. But now IndexedSeqView extends IndexedSeqViewOps, which in the end extends IterableOps instead of SeqOps, as explained in the comment here.

I'm not quite confident about how it should be fixed. Should we add a method in SeqViewOps? /cc @odersky

@odersky
Copy link
Contributor

odersky commented Feb 21, 2024

That's a tricky one. Maybe we can add updated to SeqViewOps as an inline method? That should be backwards Tasty compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:experimental:cc Capture checking related itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants