mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 00:21:29 +00:00
15 lines
219 B
Kotlin
15 lines
219 B
Kotlin
class E1: Exception()
|
|
class E2: Exception()
|
|
|
|
trait Trait {
|
|
throws()
|
|
fun none() {}
|
|
|
|
throws(javaClass<E1>())
|
|
fun one() {}
|
|
|
|
throws(javaClass<E1>(), javaClass<E2>())
|
|
fun two() {}
|
|
}
|
|
|
|
class Test: Trait |