aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t266.scala
blob: ea5f63c293146b34b1efdf87c4c49c6a961c19be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// #266, yee ha

trait O {
  self: Test.type =>

  Nil foreach identity

  def f = (1 to 10).toList map identity
}

object Test extends O {
  def main(args: Array[String]): Unit = {
    assert(f.sum == 55)
  }
}

// Don't lose this part, it's what (formerly) crashes.
// For some reason the one actually mixed in does not.
object Pip

trait P { self: Pip.type =>
  Nil foreach identity
}