aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/inferred.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-12-09 11:15:25 +0100
committerMartin Odersky <odersky@gmail.com>2013-12-09 11:15:25 +0100
commita53101c6fc3f06fed881e22736d134f6e7893ae0 (patch)
treee8d6878d9642a42c5e92e8546e4403aedcb12f3e /tests/pos/inferred.scala
parent34993a55387b381dc9e2e754d7179f0385974abd (diff)
downloaddotty-a53101c6fc3f06fed881e22736d134f6e7893ae0.tar.gz
dotty-a53101c6fc3f06fed881e22736d134f6e7893ae0.tar.bz2
dotty-a53101c6fc3f06fed881e22736d134f6e7893ae0.zip
Fixes to inherited result types in Namer.
Diffstat (limited to 'tests/pos/inferred.scala')
-rw-r--r--tests/pos/inferred.scala5
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