JS: change how signature for mangling is generated, taking into account more information. See KT-15285
This commit is contained in:
@@ -36,4 +36,20 @@ internal fun hackForTypeIntersector(types: Collection<KotlinType>): KotlinType?
|
||||
ErrorTypesAreEqualToAnything.isSubtypeOf(candidate, it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun getEffectiveVariance(parameterVariance: Variance, projectionKind: Variance): Variance {
|
||||
if (parameterVariance === Variance.INVARIANT) {
|
||||
return projectionKind
|
||||
}
|
||||
if (projectionKind === Variance.INVARIANT) {
|
||||
return parameterVariance
|
||||
}
|
||||
if (parameterVariance === projectionKind) {
|
||||
return parameterVariance
|
||||
}
|
||||
|
||||
// In<out X> = In<*>
|
||||
// Out<in X> = Out<*>
|
||||
return Variance.OUT_VARIANCE
|
||||
}
|
||||
Reference in New Issue
Block a user