[FIR2IR] Fix generation of accessors' extension receiver (f/o case)
This commit is contained in:
+3
-1
@@ -304,7 +304,9 @@ class Fir2IrDeclarationStorage(
|
|||||||
with(classifierStorage) {
|
with(classifierStorage) {
|
||||||
val thisOrigin = IrDeclarationOrigin.DEFINED
|
val thisOrigin = IrDeclarationOrigin.DEFINED
|
||||||
if (function !is FirConstructor) {
|
if (function !is FirConstructor) {
|
||||||
val receiverTypeRef = if (function !is FirPropertyAccessor) function?.receiverTypeRef else parentPropertyReceiverType
|
val receiverTypeRef =
|
||||||
|
if (function !is FirPropertyAccessor && function != null) function.receiverTypeRef
|
||||||
|
else parentPropertyReceiverType
|
||||||
if (receiverTypeRef != null) {
|
if (receiverTypeRef != null) {
|
||||||
extensionReceiverParameter = receiverTypeRef.convertWithOffsets { startOffset, endOffset ->
|
extensionReceiverParameter = receiverTypeRef.convertWithOffsets { startOffset, endOffset ->
|
||||||
declareThisReceiverParameter(
|
declareThisReceiverParameter(
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
|
|
||||||
interface I {
|
interface I {
|
||||||
val <T> T.id: T
|
val <T> T.id: T
|
||||||
get() = this
|
get() = this
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
interface I {
|
interface I {
|
||||||
val String.foo: String
|
val String.foo: String
|
||||||
get() = this + ";" + bar()
|
get() = this + ";" + bar()
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// !JVM_DEFAULT_MODE: enable
|
// !JVM_DEFAULT_MODE: enable
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// IGNORE_BACKEND: ANDROID
|
// IGNORE_BACKEND: ANDROID
|
||||||
// JVM_TARGET: 1.8
|
// JVM_TARGET: 1.8
|
||||||
|
|||||||
-1
@@ -1,7 +1,6 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// !JVM_DEFAULT_MODE: all
|
// !JVM_DEFAULT_MODE: all
|
||||||
// JVM_TARGET: 1.8
|
// JVM_TARGET: 1.8
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
interface Foo<T> {
|
interface Foo<T> {
|
||||||
fun test(p: T) = p
|
fun test(p: T) = p
|
||||||
val T.prop: T
|
val T.prop: T
|
||||||
|
|||||||
@@ -124,12 +124,13 @@ FILE fqName:<root> fileName:/useImportedMember.kt
|
|||||||
RETURN type=kotlin.Nothing from='public final fun <get-g2> <T> (): T of <root>.C.<get-g2> declared in <root>.C'
|
RETURN type=kotlin.Nothing from='public final fun <get-g2> <T> (): T of <root>.C.<get-g2> declared in <root>.C'
|
||||||
GET_VAR '<this>: T of <root>.C.<get-g2> declared in <root>.C.<get-g2>' type=T of <root>.C.<get-g2> origin=null
|
GET_VAR '<this>: T of <root>.C.<get-g2> declared in <root>.C.<get-g2>' type=T of <root>.C.<get-g2> origin=null
|
||||||
PROPERTY FAKE_OVERRIDE name:fromClass visibility:public modality:FINAL [fake_override,val]
|
PROPERTY FAKE_OVERRIDE name:fromClass visibility:public modality:FINAL [fake_override,val]
|
||||||
FUN FAKE_OVERRIDE name:<get-fromClass> visibility:public modality:FINAL <T> ($this:<root>.BaseClass) returnType:T of <root>.C.<get-fromClass> [fake_override]
|
FUN FAKE_OVERRIDE name:<get-fromClass> visibility:public modality:FINAL <T> ($this:<root>.BaseClass, $receiver:T of <root>.C.<get-fromClass>) returnType:T of <root>.C.<get-fromClass> [fake_override]
|
||||||
correspondingProperty: PROPERTY FAKE_OVERRIDE name:fromClass visibility:public modality:FINAL [fake_override,val]
|
correspondingProperty: PROPERTY FAKE_OVERRIDE name:fromClass visibility:public modality:FINAL [fake_override,val]
|
||||||
overridden:
|
overridden:
|
||||||
public final fun <get-fromClass> <T> (): T of <root>.BaseClass.<get-fromClass> declared in <root>.BaseClass
|
public final fun <get-fromClass> <T> (): T of <root>.BaseClass.<get-fromClass> declared in <root>.BaseClass
|
||||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||||
$this: VALUE_PARAMETER name:<this> type:<root>.BaseClass
|
$this: VALUE_PARAMETER name:<this> type:<root>.BaseClass
|
||||||
|
$receiver: VALUE_PARAMETER name:<this> type:T of <root>.C.<get-fromClass>
|
||||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||||
overridden:
|
overridden:
|
||||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||||
|
|||||||
Reference in New Issue
Block a user