FIR: do not force coercion-to-Unit for nullable lambda return type
3d7d87acshould have been implemented asaafe41cdid.
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
6239301f4e
commit
efeabac2c5
+1
-2
@@ -116,8 +116,7 @@ class PostponedArgumentsAnalyzer(
|
||||
c.canBeProper(rawReturnType) -> substitute(rawReturnType)
|
||||
|
||||
// For Unit-coercion
|
||||
c.hasUpperOrEqualUnitConstraint(rawReturnType) ->
|
||||
if (rawReturnType.isMarkedNullable) unitType.withNullability(ConeNullability.NULLABLE) else unitType
|
||||
!rawReturnType.isMarkedNullable && c.hasUpperOrEqualUnitConstraint(rawReturnType) -> unitType
|
||||
|
||||
else -> null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user