aboutsummaryrefslogblamecommitdiff
path: root/tests/pos/t2331.scala
blob: a7f80ac98ecdf5fc8783e42fa1670a3377f32ce2 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                 
trait C {
  def m[T]: T
}

object Test {
  val o /*: C --> no crash*/ = new C {
    def m[T]: Nothing /*: T --> no crash*/ = sys.error("omitted")
  }

  o.m[Nothing]
}