Files
kotlin-fork/compiler/testData/launcher/reflectionUsage.kt
T
Alexander Udalov 3298649bd7 Support "-no-reflect" in "kotlin" command
#KT-13491 Fixed
2016-08-26 15:17:00 +03:00

12 lines
266 B
Kotlin
Vendored

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