-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)theme: kotlinAn issue related to Kotlin supportAn issue related to Kotlin supporttype: bugA general bugA general bug
Milestone
Description
It seems that Nullness
properly gets the nullness information for Kotlin function return types, but not for members accessors in Kotlin data classes.
See the following failing test:
import org.assertj.core.api.Assertions
import org.junit.jupiter.api.Test
import kotlin.reflect.jvm.javaMethod
class NullnessKotlinTests {
@Test
fun nullableDataClassMethod() {
val method = NullableName::class.java.getDeclaredMethod("getName")
val nullness = Nullness.forMethodReturnType(method)
Assertions.assertThat(nullness).isEqualTo(Nullness.NULLABLE)
}
data class NullableName(val name: String?)
}
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)theme: kotlinAn issue related to Kotlin supportAn issue related to Kotlin supporttype: bugA general bugA general bug