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

Compiler fails with "illegal cyclic reference involving object ..." #5082

Closed
scabug opened this issue Oct 16, 2011 · 5 comments
Closed

Compiler fails with "illegal cyclic reference involving object ..." #5082

scabug opened this issue Oct 16, 2011 · 5 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Oct 16, 2011

Compiler fails to compile the following code:

object Test {
	sealed trait A
	case object A1 extends A
}

trait Something[T]

case class Test() extends Something[Test.A]

However, if Test is an ordinary class, it works.

@scabug
Copy link
Author

scabug commented Oct 16, 2011

Imported From: https://issues.scala-lang.org/browse/SI-5082?orig=1
Reporter: Filipe Cristovao (fcristovao)
Affected Versions: 2.9.1

@scabug
Copy link
Author

scabug commented Oct 16, 2011

Filipe Cristovao (fcristovao) said:
I found this: https://scala-ide-portfolio.assembla.com/spaces/scala-ide/tickets/1000658-type-illegal-cyclic-reference-involving-object
It seems to relate to the same problem. I tried to find some bug report regarding the same issue here, but haven't found any.

@scabug
Copy link
Author

scabug commented Oct 16, 2011

@paulp said:
You're right, it's the same problem, and this ticket is very very helpful because it establishes that the addition of ProductN did not create the problem, it only exacerbated the existing one.

@scabug
Copy link
Author

scabug commented Oct 16, 2011

@paulp said:
Reduced.

trait Something[T]
object Test { class A }
case class Test() extends Something[Test.A]

@scabug
Copy link
Author

scabug commented Jan 28, 2013

@retronym said:
scala/scala#1995

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants