FIR: set receivers for invoke case more precisely
This commit is contained in:
@@ -88,6 +88,8 @@ class InvokeReceiverCandidateCollector(
|
||||
(candidate.symbol as ConeCallableSymbol).callableId.callableName,
|
||||
candidate
|
||||
)
|
||||
dispatchReceiver = candidate.dispatchReceiverExpression()
|
||||
extensionReceiver = candidate.extensionReceiverExpression()
|
||||
typeRef = callResolver.typeCalculator.tryCalculateReturnType(candidate.symbol.firUnsafe())
|
||||
},
|
||||
invokeCallInfo.arguments,
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ FILE: explicitReceiver.kt
|
||||
}
|
||||
|
||||
public final fun bar(): R|Foo| {
|
||||
^bar D|R|/Foo.x||.R|/Foo.invoke|()
|
||||
^bar D|D|this@R|/Foo||.R|/Foo.x||.R|/Foo.invoke|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ FILE: explicitReceiver2.kt
|
||||
public get(): R|Bar|
|
||||
|
||||
public final fun bar(): R|Foo| {
|
||||
^bar D|R|/Foo.x||.R|/Bar.invoke|()
|
||||
^bar D|D|this@R|/Foo||.R|/Foo.x||.R|/Bar.invoke|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ FILE: extension.kt
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public final fun foo(): R|Foo| {
|
||||
^foo D|this@R|/Foo||E|R|/Foo.x||.R|/Foo.invoke|()
|
||||
^foo D|this@R|/Foo||E|D|this@R|/Foo||.R|/Foo.x||.R|/Foo.invoke|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ FILE: multipleImplicitReceivers.kt
|
||||
R|kotlin/with|<R|IFoo|, R|kotlin/Int|>(R|<local>/fooImpl|, <L> = with@fun R|IFoo|.<anonymous>(it: R|IFoo|): R|kotlin/Unit| {
|
||||
D|this@R|/IFoo||E|this@R|special/anonymous||.R|/IFoo.foo|
|
||||
R|kotlin/with|<R|IInvoke|, R|kotlin/Int|>(R|<local>/invokeImpl|, <L> = with@fun R|IInvoke|.<anonymous>(it: R|IInvoke|): R|kotlin/Unit| {
|
||||
D|this@R|/IInvoke||E|R|/IFoo.foo||.R|/IInvoke.invoke|()
|
||||
D|this@R|/IInvoke||E|D|this@R|/IFoo||E|this@R|special/anonymous||.R|/IFoo.foo||.R|/IInvoke.invoke|()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user