File: t7818.scala

package info (click to toggle)
scala 2.11.12-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 62,924 kB
  • sloc: javascript: 28,808; java: 13,415; xml: 3,135; sh: 1,620; python: 756; makefile: 38; awk: 36; ansic: 6
file content (10 lines) | stat: -rw-r--r-- 469 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
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]