Approximate projections in SAM type when creating SAM adapter
Use the same approach as Java 8 applies to function types (see non-wildcard parametrization in §9.9 of JLS) #KT-6918 Fixed
This commit is contained in:
@@ -144,3 +144,6 @@ fun KotlinType.getImmediateSuperclassNotAny(): KotlinType? {
|
||||
TypeUtils.createSubstitutedSupertype(this, it, TypeSubstitutor.create(this))
|
||||
}
|
||||
}
|
||||
|
||||
fun KotlinType.asTypeProjection(): TypeProjection = TypeProjectionImpl(this)
|
||||
fun KotlinType.containsSpecialType(predicate: (KotlinType) -> Boolean) = TypeUtils.containsSpecialType(this, predicate)
|
||||
|
||||
Reference in New Issue
Block a user