Skip to content

Bad parameter reference CC[A]#C at typer #15673

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

Closed
griggt opened this issue Jul 14, 2022 · 1 comment · Fixed by #15675
Closed

Bad parameter reference CC[A]#C at typer #15673

griggt opened this issue Jul 14, 2022 · 1 comment · Fixed by #15675

Comments

@griggt
Copy link
Contributor

griggt commented Jul 14, 2022

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
@griggt griggt added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jul 14, 2022
@griggt
Copy link
Contributor Author

griggt commented Jul 14, 2022

First bad commit is f7e38af from #14762

odersky added a commit to dotty-staging/dotty that referenced this issue Jul 14, 2022
@griggt griggt added area:typer and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jul 14, 2022
griggt pushed a commit to dotty-staging/dotty that referenced this issue Jul 15, 2022
Kordyjan pushed a commit to dotty-staging/dotty that referenced this issue Jul 26, 2022
bishabosha pushed a commit to dotty-staging/dotty that referenced this issue Oct 18, 2022
@Kordyjan Kordyjan added this to the 3.2.1 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants