File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -473,23 +473,20 @@ class FirSyntheticCallGenerator(
473
473
// Synthetic function signature:
474
474
// fun <K : Any> checkNotNull(arg: K?): K
475
475
val functionSymbol = FirSyntheticFunctionSymbol (SyntheticCallableId .CHECK_NOT_NULL )
476
- val (typeParameter, returnType) = generateSyntheticSelectTypeParameter(functionSymbol, isNullableBound = false )
477
-
478
- val argumentType = buildResolvedTypeRef {
479
- type = returnType.type.withNullability(ConeNullability .NULLABLE , session.typeContext)
480
- }
481
- val typeArgument = buildTypeProjectionWithVariance {
482
- typeRef = returnType
483
- variance = Variance .INVARIANT
484
- }
476
+ val (typeParameter, typeParameterTypeRef) = generateSyntheticSelectTypeParameter(functionSymbol, isNullableBound = false )
485
477
486
478
return generateMemberFunction(
487
479
functionSymbol,
488
480
SyntheticCallableId .CHECK_NOT_NULL .callableName,
489
- typeArgument.typeRef
481
+ typeParameterTypeRef,
490
482
).apply {
491
483
typeParameters + = typeParameter
492
- valueParameters + = argumentType.toValueParameter(" arg" , functionSymbol)
484
+
485
+ val valueParameterTypeRef = buildResolvedTypeRef {
486
+ type = typeParameterTypeRef.type.withNullability(ConeNullability .NULLABLE , session.typeContext)
487
+ }
488
+
489
+ valueParameters + = valueParameterTypeRef.toValueParameter(" arg" , functionSymbol)
493
490
}.build()
494
491
}
495
492
You can’t perform that action at this time.
0 commit comments