Files
kotlin-fork/compiler/testData/launcher/reflectionUsage.kt
T

12 lines
247 B
Kotlin
Vendored

class Foo(val bar: String?)
fun main() {
try {
if (Foo::bar.returnType.isMarkedNullable) {
print("Foo#bar is nullable")
}
} catch (e: KotlinReflectionNotSupportedError) {
print("no reflection")
}
}