Y is being used as a value there (there could be an object called Y
with a type inside it called T). To use it as a type, you want Y#T
rather than Y.T
2009/10/11 Daniel Mahler <
dmahler@...>:
> I thought this might be to much for the type system,
> but the error message is odd.
>
> scala> trait X {
> | type T
> | def v : T
> | }
> defined trait X
>
> scala> def f[Y <: X](y: Y) : Y.T = y.v
> <console>:5: error: not found: value Y
> def f[Y <: X](y: Y) : Y.T = y.v
> ^
>
> I expected some complaint about T not being known at compile time,
> but Y is defined and it is a type, not a value,
> and it is not being used as value.
>
> cheers
> Daniel
>
--
Ricky Clarkson
Java Programmer, AD Holdings
+44 1565 770804
Skype: ricky_clarkson
Google Talk:
ricky.clarkson@...