File: t8372.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-- 535 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
class t8372 {
  // failed with "error: tpe T1 is an unresolved spliceable type"; that was caused by
  // misguided type inference of type parameters in ArrayOps.unzip
  // the type inference failed because the order of implicit arguments was wrong
  // the evidence that T <: (T1, T2) came as last argument so it couldn't guide the
  // type inference early enough
  def unzip[T1, T2](a: Array[(T1, T2)]) = a.unzip
  // the same as above
  def unzip3[T1, T2, T3](a: Array[(T1, T2, T3)]): (Array[T1], Array[T2], Array[T3]) = a.unzip3
}