summaryrefslogtreecommitdiff
path: root/test/files/neg/t9535.scala
blob: 37253804cefa6b735ed856930ff24bf5ede1cd04 (plain) (blame)
1
2
3
4
5
6
7
class C[E <: Exception] {
  // cannot be expressed in Scala (it's allowed in Java)
  // https://issues.scala-lang.org/browse/SI-7066
  @throws[E1] def f[E1 <: Exception] = 1

  @throws(classOf[E]) def g: E = ??? // neg test: classOf requires class type
}