summaryrefslogtreecommitdiff
path: root/test/neg/bounds.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/neg/bounds.scala')
-rw-r--r--test/neg/bounds.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/neg/bounds.scala b/test/neg/bounds.scala
new file mode 100644
index 0000000000..f9fbeaa674
--- /dev/null
+++ b/test/neg/bounds.scala
@@ -0,0 +1,12 @@
+class I {
+ def i(): Unit = {}
+}
+class J extends I {
+ def j(): Unit = {}
+}
+class A[T >: I](init: T) {
+ var y: T = new B();
+ class B() extends I {}
+}
+class B[T >: J](init: T) extends A[T](init) {
+}