summaryrefslogtreecommitdiff
path: root/test/files/pos/t7818.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t7818.scala')
-rw-r--r--test/files/pos/t7818.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/t7818.scala b/test/files/pos/t7818.scala
new file mode 100644
index 0000000000..77b99e7d5d
--- /dev/null
+++ b/test/files/pos/t7818.scala
@@ -0,0 +1,10 @@
+class Observable1[+T](val asJava: JObservable[_ <: T]) extends AnyVal {
+ private def foo[X](a: JObservable[X]): JObservable[X] = ???
+ // was generating a type error as the type of the RHS included an existential
+ // skolem based on the class type parameter `T`, which did not conform
+ // to the typer parameter of the extension method into which the RHS is
+ // transplanted.
+ def synchronize: Observable1[T] = new Observable1(foo(asJava))
+}
+
+class JObservable[T]