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

spurious "illegal cyclic reference" in self-referring supertype #8649

Open
scabug opened this issue Jun 6, 2014 · 2 comments
Open

spurious "illegal cyclic reference" in self-referring supertype #8649

scabug opened this issue Jun 6, 2014 · 2 comments
Milestone

Comments

@scabug
Copy link

scabug commented Jun 6, 2014

This is a regression from 2.10.4, in which the following code compiles.

Welcome to Scala version 2.11.1 (OpenJDK 64-Bit Server VM, Java 1.7.0_55).
Type in expressions to have them evaluated.
Type :help for more information.

scala> trait Cm[F[_], A]
defined trait Cm

scala> case class C[A]() extends Cm[C, A]
defined class C

scala> case class D[S,A]() extends Cm[({type l[a] = D[S,a]})#l, A]
<console>:8: error: illegal cyclic reference involving class D
       case class D[S,A]() extends Cm[({type l[a] = D[S,a]})#l, A]
                  ^
<console>:8: error: D does not take type parameters
       case class D[S,A]() extends Cm[({type l[a] = D[S,a]})#l, A]
                                                    ^
@scabug
Copy link
Author

scabug commented Jun 6, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8649?orig=1
Reporter: Stephen Compall (s11001001)
Affected Versions: 2.11.1

@scabug
Copy link
Author

scabug commented Jun 6, 2014

@adriaanm said:
Workaround, for now: define it as a regular class and define the companion object manually.

@SethTisue SethTisue added this to the Backlog milestone Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants