[LC] add test on Throws annotation

This commit is contained in:
Dmitrii Gridin
2023-01-06 19:06:03 +01:00
committed by Space Team
parent 5a74fec3ac
commit 0e23ffcec9
10 changed files with 137 additions and 0 deletions
@@ -0,0 +1,24 @@
// Test
// WITH_STDLIB
abstract class Base
class MyException : Exception()
class Test
@Throws(MyException::class)
constructor(
private val p1: Int
) : Base() {
@Throws(MyException::class)
fun readSomething() {
throw MyException()
}
@get:Throws(MyException::class)
val foo : String = "42"
val boo : String = "42"
@Throws(MyException::class)
get
}