Do not add nullability annotations to the methods of anonymous classes
Nullability annotations are useless for the methods of anonymous classes due to their restricted scope. ^KT-62044: Fixed
This commit is contained in:
committed by
Space Team
parent
ed247a3892
commit
29eb1c7a63
+1
@@ -342,6 +342,7 @@ abstract class AnnotationCodegen(
|
||||
|
||||
private fun isInvisibleForNullabilityAnalysis(declaration: IrDeclaration): Boolean =
|
||||
when {
|
||||
(declaration.parent as? IrClass)?.isAnonymousObject == true -> true
|
||||
declaration.origin.isSynthetic ->
|
||||
true
|
||||
declaration.origin == JvmLoweredDeclarationOrigin.INLINE_CLASS_GENERATED_IMPL_METHOD ||
|
||||
|
||||
Reference in New Issue
Block a user