FIR call completion: approximate type argument types

This commit removes some captured / ILT types at the end of resolve
This commit is contained in:
Mikhail Glukhikh
2020-09-10 10:52:14 +03:00
parent 3b828ac62b
commit e4aaae9ae7
9 changed files with 26 additions and 20 deletions
@@ -4,5 +4,5 @@ FILE: main.kt
public final fun <D : R|A|> foo(b: R|B<D>|): R|kotlin/Unit| {
}
public final fun main(b: R|B<*>|): R|kotlin/Unit| {
R|/foo|<R|CapturedType(*)|>(R|<local>/b|)
R|/foo|<R|ft<A, A?>!|>(R|<local>/b|)
}
@@ -7,5 +7,5 @@ FILE: main.kt
}
public final fun main(): R|kotlin/Unit| {
R|/K.K|<R|kotlin/Int|>(Int(0))
R|/JavaClass.JavaClass|<R|ft<ILT: 0, ILT: 0?>!|>(Int(0))
R|/JavaClass.JavaClass|<R|ft<kotlin/Int, kotlin/Int?>!|>(Int(0))
}
@@ -15,19 +15,19 @@ FILE: receiverWithCapturedType.kt
^updateD R|<local>/d|
}
public final fun test_1_1(resolvedCall: R|ResolvedCall<out CallableDescriptor>|): R|kotlin/Unit| {
R|<local>/resolvedCall|.R|/getParameterForArgument|<R|CapturedType(out CallableDescriptor)|>()
R|<local>/resolvedCall|.R|/getParameterForArgument|<R|CallableDescriptor|>()
}
public final fun test_1_2(resolvedCall: R|ResolvedCall<in CallableDescriptor>|): R|kotlin/Unit| {
R|<local>/resolvedCall|.R|/getParameterForArgument|<R|CapturedType(in CallableDescriptor)|>()
R|<local>/resolvedCall|.R|/getParameterForArgument|<R|CallableDescriptor|>()
}
public final fun test_1_3(resolvedCall: R|ResolvedCall<CallableDescriptor>|): R|kotlin/Unit| {
R|<local>/resolvedCall|.R|/getParameterForArgument|<R|CallableDescriptor|>()
}
public final fun test_2_1(resolvedCall: R|ResolvedCall<out CallableDescriptor>|, d: R|CallableDescriptor|): R|kotlin/Unit| {
lval x: R|CallableDescriptor| = R|<local>/resolvedCall|.<Inapplicable(INAPPLICABLE): /updateD>#<R|CapturedType(out CallableDescriptor)|>(R|<local>/d|)
lval x: R|CallableDescriptor| = R|<local>/resolvedCall|.<Inapplicable(INAPPLICABLE): /updateD>#<R|CallableDescriptor|>(R|<local>/d|)
}
public final fun test_2_2(resolvedCall: R|ResolvedCall<in CallableDescriptor>|, d: R|CallableDescriptor|): R|kotlin/Unit| {
lval x: R|CallableDescriptor| = R|<local>/resolvedCall|.R|/updateD|<R|CapturedType(in CallableDescriptor)|>(R|<local>/d|)
lval x: R|CallableDescriptor| = R|<local>/resolvedCall|.R|/updateD|<R|CallableDescriptor|>(R|<local>/d|)
}
public final fun test_2_3(resolvedCall: R|ResolvedCall<CallableDescriptor>|, d: R|CallableDescriptor|): R|kotlin/Unit| {
lval x: R|CallableDescriptor| = R|<local>/resolvedCall|.R|/updateD|<R|CallableDescriptor|>(R|<local>/d|)
@@ -19,10 +19,10 @@ FILE: simpleCapturedTypes.kt
^ this@R|/idP|
}
private final fun getSetterInfos(kc: R|KC<out Ann>|): R|kotlin/Unit| {
R|/id|<R|CapturedType(out Ann)|>(R|<local>/kc|).R|FakeOverride</KC.x: R|Ann|>|.R|/Ann.foo|()
R|<local>/kc|.R|/idR|<R|CapturedType(out Ann)|>().R|FakeOverride</KC.x: R|Ann|>|.R|/Ann.foo|()
R|<local>/kc|.R|/idP|<R|CapturedType(out Ann)|>.R|FakeOverride</KC.x: R|Ann|>|.R|/Ann.foo|()
lval x1: R|KC<out Ann>| = R|/id|<R|CapturedType(out Ann)|>(R|<local>/kc|)
lval x2: R|KC<out Ann>| = R|<local>/kc|.R|/idR|<R|CapturedType(out Ann)|>()
lval x3: R|KC<out Ann>| = R|<local>/kc|.R|/idP|<R|CapturedType(out Ann)|>
R|/id|<R|Ann|>(R|<local>/kc|).R|FakeOverride</KC.x: R|Ann|>|.R|/Ann.foo|()
R|<local>/kc|.R|/idR|<R|Ann|>().R|FakeOverride</KC.x: R|Ann|>|.R|/Ann.foo|()
R|<local>/kc|.R|/idP|<R|Ann|>.R|FakeOverride</KC.x: R|Ann|>|.R|/Ann.foo|()
lval x1: R|KC<out Ann>| = R|/id|<R|Ann|>(R|<local>/kc|)
lval x2: R|KC<out Ann>| = R|<local>/kc|.R|/idR|<R|Ann|>()
lval x3: R|KC<out Ann>| = R|<local>/kc|.R|/idP|<R|Ann|>
}