summaryrefslogtreecommitdiff
path: root/test/files/neg/t6889.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/t6889.scala')
-rw-r--r--test/files/neg/t6889.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/files/neg/t6889.scala b/test/files/neg/t6889.scala
new file mode 100644
index 0000000000..ef1963669c
--- /dev/null
+++ b/test/files/neg/t6889.scala
@@ -0,0 +1,18 @@
+package bippy {
+ trait Bippy[A] extends Any
+}
+package foo {
+ package object unrelated {
+ implicit def bippyDingo[A](x: bippy.Bippy[A]): AnyRef = Nil
+ }
+ package unrelated {
+ trait Unrelated
+ }
+}
+
+object Test {
+ trait Dingo extends Any with bippy.Bippy[foo.unrelated.Unrelated]
+
+ def f(x: Dingo): AnyRef = x // fail - no conversion to AnyRef
+ var x: Int = null // fail - no conversion from Null
+}