« Return to Thread: [scala] Strange error with existentials

[scala] Strange error with existentials

by nikov :: Rate this Message:

Reply to Author | View in Thread

Hi,

When I try to compile this declaration:

/////////////////////////////////////////
trait A {
  def f[T <: Option[_]] : Unit
}
/////////////////////////////////////////

the compiler (Scala 2.7.5 final) gives the following errors:

<console>:5: error: illegal cyclic reference involving type T
         def f[T <: Option[_]] : Unit
                           ^
<console>:5: error: illegal cyclic reference involving type T
         def f[T <: Option[_]] : Unit
             ^

But I cannot see any cyclic references in the code. So, what does it mean?

Thanks,
Vladimir

 « Return to Thread: [scala] Strange error with existentials