aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/inferred.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-09-16 17:56:17 +0200
committerMartin Odersky <odersky@gmail.com>2013-09-16 17:56:17 +0200
commitdba4f1ec3dc5f489056284aab63c771cdd32561c (patch)
treeab6af09b871c2a01741fd5bbe874a1e19a3fddea /tests/pos/inferred.scala
parent682cf32cbe5cebeccf9ea10caf43e74c9cecc7c0 (diff)
downloaddotty-dba4f1ec3dc5f489056284aab63c771cdd32561c.tar.gz
dotty-dba4f1ec3dc5f489056284aab63c771cdd32561c.tar.bz2
dotty-dba4f1ec3dc5f489056284aab63c771cdd32561c.zip
Bug fixes and improvements in error diagnostics.
Main refactoring: lub/glb moves to type comparers.
Diffstat (limited to 'tests/pos/inferred.scala')
-rw-r--r--tests/pos/inferred.scala15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/pos/inferred.scala b/tests/pos/inferred.scala
index c138a8e53..03bd7ee6c 100644
--- a/tests/pos/inferred.scala
+++ b/tests/pos/inferred.scala
@@ -1,3 +1,12 @@
+class List[+T] {
+
+ def prepend [U >: T] (x: U): List[U] = null
+
+}
+
+object Nil extends List[Nothing]
+
+
object Inferred {
def foo[T](x: T): T = x
@@ -12,8 +21,8 @@ object Inferred {
val nn = bar(Nil)
- val ints: List[Int] = 1 :: Nil
+ val ints: List[Int] = Nil prepend 1
- val a = if (1 == 0) Nil else ints
+ // val a = if (1 == 0) Nil else ints
-}
+} \ No newline at end of file