Skip to content

Commit

Permalink
Add test case for @nullable Void with override in JSpecify mode (#990)
Browse files Browse the repository at this point in the history
See #801
  • Loading branch information
msridhar authored Jun 30, 2024
1 parent 09e9a93 commit a3b94e9
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,24 @@ public void overrideAnonymousNestedClass() {
.doTest();
}

@Test
public void nullableVoidGenericsLambda() {
makeHelper()
.addSourceLines(
"Test.java",
"package com.uber;",
"import org.jspecify.annotations.Nullable;",
"class Test {",
" interface TestInterface<T extends @Nullable Object> {",
" T test();",
" }",
" public TestInterface<@Nullable Void> getTest() {",
" return () -> { return null; };",
" }",
"}")
.doTest();
}

@Test
public void explicitlyTypedAnonymousClassAsReceiver() {
makeHelper()
Expand Down

0 comments on commit a3b94e9

Please sign in to comment.