« Return to Thread: [scala] Compiler bug? Or my fault?

[scala] Compiler bug? Or my fault?

by Aaron Harnly :: Rate this Message:

Reply to Author | View in Thread

The following script fails to compile under 2.7.1,
with the error "illegal cyclic reference involving object bar."
If I specify the type parameter with Bar[Int](1), it compiles without complaint.
I _really_ don't understand what the one has to do with the other.

Is this a compiler bug (known? novel?), or conceivably my fault?
cheers,
aaron

trait Foo

case class Bar[E](input: E)(
  implicit val foo: Foo
)

implicit object f extends Foo
implicit object bar extends Bar(1)

1




 « Return to Thread: [scala] Compiler bug? Or my fault?

LightInTheBox - Buy quality products at wholesale price!