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
|
||||
|
||||
@TypeRefinement
|
||||
override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): TypeProjection =
|
||||
TypeBasedStarProjectionImpl(kotlinTypeRefiner.refineType(type))
|
||||
|
||||
override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): TypeProjection = this
|
||||
}
|
||||
|
||||
fun TypeParameterDescriptor.starProjectionType(): KotlinType {
|
||||
@@ -66,6 +64,5 @@ class TypeBasedStarProjectionImpl(
|
||||
override fun getType() = _type
|
||||
|
||||
@TypeRefinement
|
||||
override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): TypeProjection =
|
||||
TypeBasedStarProjectionImpl(kotlinTypeRefiner.refineType(_type))
|
||||
override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): TypeProjection = this
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user