diff options
Diffstat (limited to 'tests/pos/inferred.scala')
-rw-r--r-- | tests/pos/inferred.scala | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/pos/inferred.scala b/tests/pos/inferred.scala index 441ae9650..525848541 100644 --- a/tests/pos/inferred.scala +++ b/tests/pos/inferred.scala @@ -16,13 +16,12 @@ object NIL extends LIST[Nothing] { def tail = ??? } -class CONS[T](hd: T, tl: LIST[T]) extends LIST[T] { +class CONS[U](hd: U, tl: LIST[U]) extends LIST[U] { def isEmpty = false - def head = hd + def head: U = hd def tail = tl } - object Inferred { def foo[T](x: T): T = x |