diff options
Diffstat (limited to 'tests/untried/pos/t7818.scala')
-rw-r--r-- | tests/untried/pos/t7818.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/untried/pos/t7818.scala b/tests/untried/pos/t7818.scala new file mode 100644 index 000000000..77b99e7d5 --- /dev/null +++ b/tests/untried/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] |