[FIR] take ready implicit unit type instead of return type calculation
and assert that symbol is not a substitution/intersection override in the `compute` method otherwise. Because `fakeOverrideSubstitution` should be calculated for all real implicit types, no call to this method should actually happen. Otherwise, it can be problematic to create a session which would contain the full designation path: `provider.getFirCallableContainerFile(symbol)` returns `firFile` of a super class which might be from module `a`, when declaration and its outer classes are from module `b`. ^KTIJ-24105
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// WITH_STDLIB
|
||||
package main
|
||||
|
||||
import kotlin.collections.MutableList
|
||||
|
||||
abstract class B : MutableList<String>() {}
|
||||
|
||||
fun usage(b : B?) {
|
||||
if (b != null) {
|
||||
<expr>b.clear()</expr>
|
||||
}
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
KtSuccessCallInfo:
|
||||
call = KtSimpleFunctionCall:
|
||||
isImplicitInvoke = false
|
||||
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
|
||||
dispatchReceiver = KtSmartCastedReceiverValue:
|
||||
original = KtExplicitReceiverValue:
|
||||
expression = b
|
||||
isSafeNavigation = false
|
||||
type = main.B?
|
||||
type = main.B
|
||||
extensionReceiver = null
|
||||
signature = KtFunctionLikeSignature:
|
||||
receiverType = null
|
||||
returnType = kotlin.Unit
|
||||
symbol = kotlin/collections/MutableList.clear(<dispatch receiver>: kotlin.collections.MutableList<E>): kotlin.Unit
|
||||
valueParameters = []
|
||||
callableIdIfNonLocal = kotlin/collections/MutableList.clear
|
||||
typeArgumentsMapping = {}
|
||||
argumentMapping = {}
|
||||
Reference in New Issue
Block a user