Avoid recursive refinement with star projections
Otherwise StackOverflowError or recursion-detection in LockBasedStorageManager may happen It's fine to have non-refined type there because it only can affect content of containing type member scope that should be refined after being requested
This commit is contained in:
committed by
Dmitry Savvinov
parent
d042eb2cfb
commit
a2a1c7e50f
@@ -37,9 +37,7 @@ class StarProjectionImpl(
|
|||||||
override fun getType() = _type
|
override fun getType() = _type
|
||||||
|
|
||||||
@TypeRefinement
|
@TypeRefinement
|
||||||
override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): TypeProjection =
|
override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): TypeProjection = this
|
||||||
TypeBasedStarProjectionImpl(kotlinTypeRefiner.refineType(type))
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun TypeParameterDescriptor.starProjectionType(): KotlinType {
|
fun TypeParameterDescriptor.starProjectionType(): KotlinType {
|
||||||
@@ -66,6 +64,5 @@ class TypeBasedStarProjectionImpl(
|
|||||||
override fun getType() = _type
|
override fun getType() = _type
|
||||||
|
|
||||||
@TypeRefinement
|
@TypeRefinement
|
||||||
override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): TypeProjection =
|
override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): TypeProjection = this
|
||||||
TypeBasedStarProjectionImpl(kotlinTypeRefiner.refineType(_type))
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user