aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/neg/i2086a.scala4
-rw-r--r--tests/neg/i2086b.scala5
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/neg/i2086a.scala b/tests/neg/i2086a.scala
new file mode 100644
index 000000000..b80535c2c
--- /dev/null
+++ b/tests/neg/i2086a.scala
@@ -0,0 +1,4 @@
+
+object Test { // error: Test cannot be instantiated since it has a member type Foo with possibly conflicting bounds Any <: ... <: Nothing
+ type Foo >: Any <: Nothing
+}
diff --git a/tests/neg/i2086b.scala b/tests/neg/i2086b.scala
new file mode 100644
index 000000000..0a5e296fd
--- /dev/null
+++ b/tests/neg/i2086b.scala
@@ -0,0 +1,5 @@
+
+object Test { // error: Test cannot be instantiated since it has a member type Bound with possibly conflicting bounds [Left, Right] => Left <: ... <: [Left, Right] => Right
+ type Bound[Left, Right] >: Left <: Right
+ type Foo = Bound[Any, Nothing]
+}