Skip to content

Commit

Permalink
tests for parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Oct 30, 2024
1 parent 76623cc commit 641b9ee
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public void genericInstanceMethods() {
" abstract class Foo<T extends @Nullable String, S> {",
" public abstract <U> T test1(U u);",
" public abstract <U> S test2(U u);",
" public abstract <U extends @Nullable Object> void test3(U u);",
" }",
" public void run(Foo<@Nullable String, Character> f) {",
" String s = f.<Integer>test1(3);",
Expand All @@ -95,6 +96,9 @@ public void genericInstanceMethods() {
" Character c = f.<Integer>test2(3);",
" // legal, Type S is @NonNull",
" c.toString();",
" // BUG: Diagnostic contains: passing @Nullable parameter 'null'",
" f.<Integer>test3(null);",
" f.<@Nullable Integer>test3(null);",
" }",
"}")
.doTest();
Expand Down

0 comments on commit 641b9ee

Please sign in to comment.