Closed
Description
This is a reproducer for the community build failure of scala-tessella/ring-seq reported in #15647
Compiler version
3.2.0-RC2
Works in 3.1.2
Fails in 3.1.3
Fails in 3.2.0-RC*
Fails in 3.2.1-RC1-bin-20220711-6efd92d-NIGHTLY
Minimized code
trait SeqOps[+A, +CC[_], +C]: // scala.collection.SeqOps
def reverse: C
extension[A, CC[B] <: SeqOps[B, CC, CC[B]]](ring: CC[A])
def startAt(i: Int): CC[A] = ???
def reflectAt(i: Int): CC[A] =
startAt(i).reverse
Output
-- Error: ring.scala:7:11 ------------------------------------------------------
7 | startAt(i).reverse
| ^
| bad parameter reference CC[A]#C at typer
| the parameter is type C in trait SeqOps but the prefix CC[A]
| does not define any corresponding arguments.
| idx = 2, args = [A]
Workaround
- startAt(i).reverse
+ val c = startAt(i)
+ c.reverse