[FIR] Don't transform setter parameter type if it's given explicitly
This commit is contained in:
+3
-1
@@ -294,7 +294,9 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor
|
|||||||
enhancedTypeRef = returnTypeRef
|
enhancedTypeRef = returnTypeRef
|
||||||
}
|
}
|
||||||
setter?.let {
|
setter?.let {
|
||||||
it.valueParameters[0].transformReturnTypeRef(StoreType, enhancedTypeRef)
|
if (it.valueParameters[0].returnTypeRef is FirImplicitTypeRef) {
|
||||||
|
it.valueParameters[0].transformReturnTypeRef(StoreType, enhancedTypeRef)
|
||||||
|
}
|
||||||
transformAccessor(it, enhancedTypeRef, this)
|
transformAccessor(it, enhancedTypeRef, this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ enum class Color {
|
|||||||
|
|
||||||
class MyColor(val x: <!UNRESOLVED_REFERENCE!>Color.RED<!>, y: <!UNRESOLVED_REFERENCE!>Color.RED<!>) : <!UNRESOLVED_REFERENCE!>Color.RED<!> {
|
class MyColor(val x: <!UNRESOLVED_REFERENCE!>Color.RED<!>, y: <!UNRESOLVED_REFERENCE!>Color.RED<!>) : <!UNRESOLVED_REFERENCE!>Color.RED<!> {
|
||||||
|
|
||||||
var z: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Color.RED<!> = Color.RED
|
var z: <!UNRESOLVED_REFERENCE!>Color.RED<!> = Color.RED
|
||||||
set(arg: Color.RED) { z = arg }
|
set(arg: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Color.RED<!>) { z = arg }
|
||||||
|
|
||||||
fun foo(arg: <!UNRESOLVED_REFERENCE!>Color.RED<!>): <!UNRESOLVED_REFERENCE!>Color.RED<!> = arg
|
fun foo(arg: <!UNRESOLVED_REFERENCE!>Color.RED<!>): <!UNRESOLVED_REFERENCE!>Color.RED<!> = arg
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user