mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-25 00:09:02 +00:00
Refine Nullness for Kotlin functions returning Unit
Should have unspecified nullness like for Java void/Void. Closes gh-35420
This commit is contained in:
@@ -377,6 +377,13 @@ public class NullnessTests {
|
||||
Assertions.assertThat(nullness).isEqualTo(Nullness.NULLABLE);
|
||||
}
|
||||
|
||||
@Test
|
||||
void voidClassMethod() throws NoSuchMethodException {
|
||||
var method = JSpecifyProcessor.class.getMethod("voidClassProcess");
|
||||
var nullness = Nullness.forMethodReturnType(method);
|
||||
Assertions.assertThat(nullness).isEqualTo(Nullness.UNSPECIFIED);
|
||||
}
|
||||
|
||||
// Primitive types
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user