[FIR] Update type of getter after approximation of property type

This commit is contained in:
Dmitriy Novozhilov
2021-07-02 12:51:45 +03:00
parent d472b6c71c
commit 32173a408a
2 changed files with 3 additions and 1 deletions
@@ -9,7 +9,7 @@ FILE: annotationArgumentKClassLiteralTypeError.kt
}
public final val <reified T> R|T|.test: R|kotlin/Any|
public inline get(): R|<anonymous><T>| {
public inline get(): R|kotlin/Any| {
^ @R|Ann|(<implicitArrayOf>(<getClass>(R|T|), <getClass>(Q|kotlin/Array|))) object : R|kotlin/Any| {
private constructor(): R|<anonymous><T>| {
super<R|kotlin/Any|>()
@@ -307,6 +307,8 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor
if (returnTypeRef is FirImplicitTypeRef) {
storeVariableReturnType(this)
enhancedTypeRef = returnTypeRef
// We need update type of getter for case when its type was approximated
getter?.replaceReturnTypeRef(enhancedTypeRef)
}
setter?.let {
if (it.valueParameters[0].returnTypeRef is FirImplicitTypeRef) {