12 lines
247 B
Kotlin
Vendored
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")
|
|
}
|
|
}
|