File: t3731.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 (13 lines) | stat: -rw-r--r-- 555 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
object Test{
  trait ZW[S]{type T}
  def ZipWith[S, M <: ZW[S]]: M#T = sys.error("ZW")

  // meh must be parameterised to force an asSeenFrom that
  // duplicates the refinement in the TR's pre without updating its sym
  def meh[A] = ZipWith[A, ZW[A]{type T=Stream[A]}]

  meh[Int]: Stream[Int]
}
// debugging output in coevolveSym should say:
// coevolved type T#11029 : Stream#3234[A#9228] to type T#11277 : Stream#3234[A#9227]
// with Test.ZW#9219[A#9228]{type T#11029 = Stream#3234[A#9228]} -> Test.ZW#9219[A#9227]{type T#11277 = Stream#3234[A#9227]}