[FIR]: add missed bindings for WrappedReceiverParameterDescriptor.
This commit is contained in:
committed by
Mikhail Glukhikh
parent
ea267d9ef4
commit
d3b21aed8a
+12
-4
@@ -111,14 +111,18 @@ class Fir2IrDeclarationStorage(
|
|||||||
val thisOrigin = IrDeclarationOrigin.INSTANCE_RECEIVER
|
val thisOrigin = IrDeclarationOrigin.INSTANCE_RECEIVER
|
||||||
val thisType = IrSimpleTypeImpl(symbol, false, emptyList(), emptyList())
|
val thisType = IrSimpleTypeImpl(symbol, false, emptyList(), emptyList())
|
||||||
val parent = this
|
val parent = this
|
||||||
|
val receiverDescriptor = WrappedReceiverParameterDescriptor()
|
||||||
thisReceiver = irSymbolTable.declareValueParameter(
|
thisReceiver = irSymbolTable.declareValueParameter(
|
||||||
startOffset, endOffset, thisOrigin, WrappedReceiverParameterDescriptor(), thisType
|
startOffset, endOffset, thisOrigin, receiverDescriptor, thisType
|
||||||
) { symbol ->
|
) { symbol ->
|
||||||
IrValueParameterImpl(
|
IrValueParameterImpl(
|
||||||
startOffset, endOffset, thisOrigin, symbol,
|
startOffset, endOffset, thisOrigin, symbol,
|
||||||
Name.special("<this>"), -1, thisType,
|
Name.special("<this>"), -1, thisType,
|
||||||
varargElementType = null, isCrossinline = false, isNoinline = false
|
varargElementType = null, isCrossinline = false, isNoinline = false
|
||||||
).apply { this.parent = parent }
|
).apply {
|
||||||
|
this.parent = parent
|
||||||
|
receiverDescriptor.bind(this)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
leaveScope(descriptor)
|
leaveScope(descriptor)
|
||||||
}
|
}
|
||||||
@@ -351,15 +355,19 @@ class Fir2IrDeclarationStorage(
|
|||||||
}
|
}
|
||||||
if (containingClass != null && !isStatic) {
|
if (containingClass != null && !isStatic) {
|
||||||
val thisType = containingClass.thisReceiver!!.type
|
val thisType = containingClass.thisReceiver!!.type
|
||||||
|
val descriptor = WrappedReceiverParameterDescriptor()
|
||||||
dispatchReceiverParameter = irSymbolTable.declareValueParameter(
|
dispatchReceiverParameter = irSymbolTable.declareValueParameter(
|
||||||
startOffset, endOffset, thisOrigin, WrappedReceiverParameterDescriptor(),
|
startOffset, endOffset, thisOrigin, descriptor,
|
||||||
thisType
|
thisType
|
||||||
) { symbol ->
|
) { symbol ->
|
||||||
IrValueParameterImpl(
|
IrValueParameterImpl(
|
||||||
startOffset, endOffset, thisOrigin, symbol,
|
startOffset, endOffset, thisOrigin, symbol,
|
||||||
Name.special("<this>"), -1, thisType,
|
Name.special("<this>"), -1, thisType,
|
||||||
varargElementType = null, isCrossinline = false, isNoinline = false
|
varargElementType = null, isCrossinline = false, isNoinline = false
|
||||||
).apply { this.parent = parent }
|
).apply {
|
||||||
|
this.parent = parent
|
||||||
|
descriptor.bind(this)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
class MyRange1() : ClosedRange<Int> {
|
class MyRange1() : ClosedRange<Int> {
|
||||||
override val start: Int
|
override val start: Int
|
||||||
get() = 0
|
get() = 0
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// !LANGUAGE: +FunctionTypesWithBigArity
|
// !LANGUAGE: +FunctionTypesWithBigArity
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// FILE: J.java
|
// FILE: J.java
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// !LANGUAGE: +FunctionTypesWithBigArity
|
// !LANGUAGE: +FunctionTypesWithBigArity
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
|
|
||||||
// Implementing function interface is prohibited in JavaScript
|
// Implementing function interface is prohibited in JavaScript
|
||||||
// IGNORE_BACKEND: JS_IR, JS
|
// IGNORE_BACKEND: JS_IR, JS
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
interface B<T> {
|
interface B<T> {
|
||||||
fun foo(dd: T): T = dd
|
fun foo(dd: T): T = dd
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user