[FIR] Implement fir-specific contract values and fix annotations serialization

This commit is contained in:
Dmitriy Novozhilov
2020-09-02 13:20:46 +03:00
parent e1ad1aabc4
commit 9beeb51227
7 changed files with 373 additions and 38 deletions
@@ -49,3 +49,9 @@ fun ConeKotlinType.toTypeProjection(variance: Variance): ConeTypeProjection =
Variance.IN_VARIANCE -> ConeKotlinTypeProjectionIn(this)
Variance.OUT_VARIANCE -> ConeKotlinTypeProjectionOut(this)
}
fun ConeClassLikeType.replaceArgumentsWithStarProjections(): ConeClassLikeType {
if (typeArguments.isEmpty()) return this
val newArguments = Array(typeArguments.size) { ConeStarProjection }
return withArguments(newArguments)
}