Files
Mikhail Glukhikh 83cfcc30c6 K2: handle type parameter vs nested class conflict in body resolve properly
This commit does two things:
- prioritize type parameter scopes against static scopes in body resolve
(effectively it's a revert of KT-58028 fix)
- consider type parameters as inapplicable callable, so during callable
resolve we can go up the tower and still resolve to static scope

This allows both KT-58028 and KT-63377 to work properly
#KT-63377 Fixed
2023-11-24 21:28:16 +00:00

61 lines
2.2 KiB
Plaintext
Vendored

Tower Data Context:
Element 0
Scope: FirDefaultStarImportingScope
Element 1
Scope: FirExplicitStarImportingScope
Element 2
Scope: FirDefaultSimpleImportingScope
Element 3
Scope: FirDefaultSimpleImportingScope
Element 4
Scope: FirPackageMemberScope
Element 5
Scope: FirExplicitSimpleImportingScope
Element 6
Scope: FirNestedClassifierScopeImpl
Classifiers:
FirRegularClassSymbol public final inner class Bar<B, Outer(F)> : R|kotlin/Any|
Element 7
Scope: FirMemberTypeParameterScope
Classifiers:
FirTypeParameterSymbol F
Element 8
Implicit receiver:
FirRegularClassSymbol public final class Foo<F> : R|kotlin/Any|
Type: test.Foo<F>
Element 9
Scope: FirMemberTypeParameterScope
Classifiers:
FirTypeParameterSymbol B
Element 10
Implicit receiver:
FirRegularClassSymbol public final inner class Bar<B, Outer(F)> : R|kotlin/Any|
Type: test.Foo.Bar<B, F>
Element 11
Scope: FirLocalScope
Properties:
FirValueParameterSymbol b: R|B|
FirValueParameterSymbol f: R|F|
Element 12
Scope: FirLocalScope
FILE: [ResolvedTo(IMPORTS)] innerClasses.kt
public final [ResolvedTo(STATUS)] class Foo<[ResolvedTo(STATUS)] F> : R|kotlin/Any| {
public [ResolvedTo(STATUS)] constructor<[ResolvedTo(STATUS)] F>(): R|test/Foo<F>| {
LAZY_super<R|kotlin/Any|>
}
public final inner [ResolvedTo(STATUS)] class Bar<[ResolvedTo(STATUS)] B, [ResolvedTo(STATUS)] Outer(F)> : R|kotlin/Any| {
public [ResolvedTo(STATUS)] test/Foo<F>.constructor<[ResolvedTo(STATUS)] B>(): R|test/Foo.Bar<B, F>| {
LAZY_super<R|kotlin/Any|>
}
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] f: R|F|, [ResolvedTo(BODY_RESOLVE)] b: R|B|): R|kotlin/Unit| {
R|test/consume<Inapplicable(INAPPLICABLE): test/consume>#|(R|<local>/f|)
}
}
}
public final [ResolvedTo(CONTRACTS)] fun consume([ResolvedTo(CONTRACTS)] obj: R|kotlin/Any|): R|kotlin/Unit| {
}