But updating Gradle to 7.5 and thus Kotlin to 1.6.10 now gives a compilation error (well warning, but we have
-Werror
) about wrong nullability:
Copy code
w: ...\buildSrc\src\main\kotlin\...\util\SamHelper.kt: (10, 7): Override 'fun execute(t: T): Unit' has incorrect nullability in its signature comparing with overridden 'fun execute(p0: T): Unit'
What is his problem suddenly and how do I mitigate it?
s
Sam
07/25/2022, 11:49 AM
In my IDE there’s a longer error:
Type parameter ‘T’ has nullable upper bound, so override has incorrect signature comparing with a base member with NotNull annotation. Please add a non-nullable upper bound (e.g. Any) to the type parameter. See https://kotlinlang.org/docs/generics.html#upper-bounds for more details