File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -304,11 +304,9 @@ class BaseWithBound<T : Number> {}
304
304
So passing nullable type as a type argument or type parameter produces a warning.
305
305
306
306
Annotating type arguments and type parameters works with the Java 8 target or higher. The feature requires that the
307
- nullability annotations support the ` TYPE_USE ` target (` org.jetbrains.annotations ` supports this in version 15 and above).
308
- Pass the ` -Xtype-enhancement-improvements-strict-mode ` compiler option to report errors in Kotlin code that uses
309
- nullability which deviates from the nullability annotations from Java.
307
+ nullability annotations support the ` TYPE_USE ` target (` org.jetbrains.annotations ` supports this in version 15 and above).
310
308
311
- > Note: If a nullability annotation supports other targets that are applicable to a type in addition to the ` TYPE_USE ` target, then
309
+ > If a nullability annotation supports other targets that are applicable to a type in addition to the ` TYPE_USE ` target,
312
310
> ` TYPE_USE ` takes priority. For example, if ` @Nullable ` has both ` TYPE_USE ` and ` METHOD ` targets, the Java method
313
311
> signature ` @Nullable String[] f() ` becomes ` fun f(): Array<String?>! ` in Kotlin.
314
312
>
You can’t perform that action at this time.
0 commit comments