Do not annotate bare type parameters as @Nullable
This is to account for the case of, say
class Function<R> { fun invoke(): R }
it would be a shame to put @Nullable on the return type of the function, and force all callers to check for null,
so we put no annotations
This commit is contained in:
@@ -86,6 +86,10 @@ public class NullabilityAnnotationsTest extends KotlinAsJavaTestBase {
|
||||
doTest(getTestName(false));
|
||||
}
|
||||
|
||||
public void testGeneric() throws Exception {
|
||||
doTest(getTestName(false));
|
||||
}
|
||||
|
||||
private void doTest(@NotNull String fqName) {
|
||||
PsiClass psiClass = finder.findClass(fqName, GlobalSearchScope.allScope(getProject()));
|
||||
if (!(psiClass instanceof KotlinLightClass)) {
|
||||
|
||||
Reference in New Issue
Block a user