Skip to content

Missing methods in SeqViewOps in Scala 2 library CC #19988

Closed
@Linyxus

Description

@Linyxus

Compiler version

main

Minimized code

To reproduce, set the stdlib to the capture checked one and compile the snippet:

> set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty
> scala3-bootstrapped/scalac Hello.scala
import collection.IndexedSeqView
object Hello extends App {
  def foo(view: IndexedSeqView[Int]): Unit =
    val x1 = 1 +: view
    val x2 = view :+ 1
}

Output

-- [E008] Not Found Error: Hello.scala:4:15 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4 |    val x1 = 1 +: view
  |               ^^^^^^^
  |               value +: is not a member of scala.collection.IndexedSeqView[Int] - did you mean view.++? or perhaps view.++: or view./:?
-- [E008] Not Found Error: Hello.scala:5:18 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
5 |    val x2 = view :+ 1
  |             ^^^^^^^
  |             value :+ is not a member of scala.collection.IndexedSeqView[Int] - did you mean view.++? or perhaps view.:\?
2 errors found

Expectation

It should compile.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions