JVM_IR: Add null-checks in SAM wrapper constructors (KT-50108)
This commit is contained in:
committed by
Alexander Udalov
parent
7f531d8426
commit
0da23198e6
+1
-3
@@ -291,9 +291,7 @@ class ExpressionCodegen(
|
||||
irFunction.origin.isSynthetic ||
|
||||
// TODO: refine this condition to not generate nullability assertions on parameters
|
||||
// corresponding to captured variables and anonymous object super constructor arguments
|
||||
(irFunction is IrConstructor &&
|
||||
(irFunction.parentAsClass.isAnonymousObject ||
|
||||
irFunction.parentAsClass.origin == IrDeclarationOrigin.GENERATED_SAM_IMPLEMENTATION)) ||
|
||||
(irFunction is IrConstructor && irFunction.parentAsClass.isAnonymousObject) ||
|
||||
// TODO: Implement this as a lowering, so that we can more easily exclude generated methods.
|
||||
irFunction.origin == JvmLoweredDeclarationOrigin.INLINE_CLASS_GENERATED_IMPL_METHOD ||
|
||||
// Although these are accessible from Java, the functions they bridge to already have the assertions.
|
||||
|
||||
Reference in New Issue
Block a user