aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/bounds.scala7
-rw-r--r--tests/pos/t1279a.scala (renamed from tests/neg/t1279a.scala)0
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/pos/bounds.scala b/tests/pos/bounds.scala
index 26bc84a1b..625359f74 100644
--- a/tests/pos/bounds.scala
+++ b/tests/pos/bounds.scala
@@ -9,3 +9,10 @@ object ListMap {
def empty[X, Y] = new ListMap[X, Y]
def apply[A1, B2](elems: Tuple2[A1, B2]*): Map[A1, B2] = empty[A1,B2].++(elems.iterator)
}
+
+class Test[A] {
+
+ def f[B >: A <: AnyRef](x: A): AnyRef = (x: B)
+ def g[B >: String <: Int](x: B): Int = x
+
+}
diff --git a/tests/neg/t1279a.scala b/tests/pos/t1279a.scala
index 6d768d435..6d768d435 100644
--- a/tests/neg/t1279a.scala
+++ b/tests/pos/t1279a.scala