K2: Don't use FirTypeParameterSymbol.resolvedBounds() from inference

This commit is contained in:
Mikhail Glukhikh
2022-11-18 18:37:09 +01:00
committed by Space Team
parent e57521ed23
commit df5aa59185
7 changed files with 464 additions and 6 deletions
@@ -0,0 +1,170 @@
RAW_FIR:
FILE: functionCallWithGenericResult.kt
public? open [RAW_FIR] class Foo<[RAW_FIR] T : CharSequence> : R|kotlin/Any| {
public? [RAW_FIR] [ContainingClassKey=Foo] constructor<[RAW_FIR] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public? final? [RAW_FIR] fun bar(): Foo<String>? { LAZY_BLOCK }
public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK }
IMPORTS:
FILE: functionCallWithGenericResult.kt
public? open [RAW_FIR] class Foo<[RAW_FIR] T : CharSequence> : R|kotlin/Any| {
public? [RAW_FIR] [ContainingClassKey=Foo] constructor<[RAW_FIR] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public? final? [RAW_FIR] fun bar(): Foo<String>? { LAZY_BLOCK }
public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK }
COMPILER_REQUIRED_ANNOTATIONS:
FILE: functionCallWithGenericResult.kt
public? open [RAW_FIR] class Foo<[RAW_FIR] T : CharSequence> : R|kotlin/Any| {
public? [RAW_FIR] [ContainingClassKey=Foo] constructor<[RAW_FIR] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public? final? [RAW_FIR] fun bar(): Foo<String>? { LAZY_BLOCK }
public? final? [COMPILER_REQUIRED_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK }
COMPANION_GENERATION:
FILE: functionCallWithGenericResult.kt
public? open [RAW_FIR] class Foo<[RAW_FIR] T : CharSequence> : R|kotlin/Any| {
public? [RAW_FIR] [ContainingClassKey=Foo] constructor<[RAW_FIR] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public? final? [RAW_FIR] fun bar(): Foo<String>? { LAZY_BLOCK }
public? final? [COMPANION_GENERATION] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK }
SUPER_TYPES:
FILE: functionCallWithGenericResult.kt
public? open [RAW_FIR] class Foo<[RAW_FIR] T : CharSequence> : R|kotlin/Any| {
public? [RAW_FIR] [ContainingClassKey=Foo] constructor<[RAW_FIR] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public? final? [RAW_FIR] fun bar(): Foo<String>? { LAZY_BLOCK }
public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK }
TYPES:
FILE: functionCallWithGenericResult.kt
public? open [RAW_FIR] class Foo<[RAW_FIR] T : CharSequence> : R|kotlin/Any| {
public? [RAW_FIR] [ContainingClassKey=Foo] constructor<[RAW_FIR] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public? final? [RAW_FIR] fun bar(): Foo<String>? { LAZY_BLOCK }
public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK }
STATUS:
FILE: functionCallWithGenericResult.kt
public? open [RAW_FIR] class Foo<[RAW_FIR] T : CharSequence> : R|kotlin/Any| {
public? [RAW_FIR] [ContainingClassKey=Foo] constructor<[RAW_FIR] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public? final? [RAW_FIR] fun bar(): Foo<String>? { LAZY_BLOCK }
public final [STATUS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK }
ARGUMENTS_OF_ANNOTATIONS:
FILE: functionCallWithGenericResult.kt
public? open [RAW_FIR] class Foo<[RAW_FIR] T : CharSequence> : R|kotlin/Any| {
public? [RAW_FIR] [ContainingClassKey=Foo] constructor<[RAW_FIR] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public? final? [RAW_FIR] fun bar(): Foo<String>? { LAZY_BLOCK }
public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK }
CONTRACTS:
FILE: functionCallWithGenericResult.kt
public? open [RAW_FIR] class Foo<[RAW_FIR] T : CharSequence> : R|kotlin/Any| {
public? [RAW_FIR] [ContainingClassKey=Foo] constructor<[RAW_FIR] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public? final? [RAW_FIR] fun bar(): Foo<String>? { LAZY_BLOCK }
public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| {
[RAW_FIR] lval x: <implicit> = bar#()
}
IMPLICIT_TYPES_BODY_RESOLVE:
FILE: functionCallWithGenericResult.kt
public? open [RAW_FIR] class Foo<[RAW_FIR] T : CharSequence> : R|kotlin/Any| {
public? [RAW_FIR] [ContainingClassKey=Foo] constructor<[RAW_FIR] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public? final? [RAW_FIR] fun bar(): Foo<String>? { LAZY_BLOCK }
public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| {
[RAW_FIR] lval x: <implicit> = bar#()
}
ANNOTATIONS_ARGUMENTS_MAPPING:
FILE: functionCallWithGenericResult.kt
public? open [RAW_FIR] class Foo<[RAW_FIR] T : CharSequence> : R|kotlin/Any| {
public? [RAW_FIR] [ContainingClassKey=Foo] constructor<[RAW_FIR] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public? final? [RAW_FIR] fun bar(): Foo<String>? { LAZY_BLOCK }
public final [ANNOTATIONS_ARGUMENTS_MAPPING] fun resolveMe(): R|kotlin/Unit| {
[RAW_FIR] lval x: <implicit> = bar#()
}
EXPECT_ACTUAL_MATCHING:
FILE: functionCallWithGenericResult.kt
public? open [RAW_FIR] class Foo<[RAW_FIR] T : CharSequence> : R|kotlin/Any| {
public? [RAW_FIR] [ContainingClassKey=Foo] constructor<[RAW_FIR] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public? final? [RAW_FIR] fun bar(): Foo<String>? { LAZY_BLOCK }
public final [EXPECT_ACTUAL_MATCHING] fun resolveMe(): R|kotlin/Unit| {
[RAW_FIR] lval x: <implicit> = bar#()
}
BODY_RESOLVE:
FILE: functionCallWithGenericResult.kt
public? open [COMPILER_REQUIRED_ANNOTATIONS] class Foo<[COMPILER_REQUIRED_ANNOTATIONS] T : CharSequence> : R|kotlin/Any| {
public? [COMPILER_REQUIRED_ANNOTATIONS] [ContainingClassKey=Foo] constructor<[COMPILER_REQUIRED_ANNOTATIONS] T : CharSequence>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public final [CONTRACTS] fun bar(): R|Foo<kotlin/String>?| {
^bar Null(null)
}
public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| {
[BODY_RESOLVE] lval x: R|Foo<kotlin/String>?| = R|/bar|()
}
FILE RAW TO BODY:
FILE: functionCallWithGenericResult.kt
public open [BODY_RESOLVE] class Foo<[BODY_RESOLVE] T : R|kotlin/CharSequence|> : R|kotlin/Any| {
public [BODY_RESOLVE] [ContainingClassKey=Foo] constructor<[BODY_RESOLVE] T : R|kotlin/CharSequence|>(): R|Foo<T>| {
super<R|kotlin/Any|>()
}
}
public final [BODY_RESOLVE] fun bar(): R|Foo<kotlin/String>?| {
^bar Null(null)
}
public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| {
[BODY_RESOLVE] lval x: R|Foo<kotlin/String>?| = R|/bar|()
}