Files
kotlin-fork/analysis/analysis-api/testData/referenceResolve/ResolveClass.kt
T
Mads Ager d13e117a58 Change FIR analysis API resolution for super type calls.
The IDE expects the super type calls to resolve to the constructor
invoked and not the class. The frontend itself resolves to the
class, so an extra layer is needed to adjust that to the constructor.
2022-02-01 16:31:26 +01:00

15 lines
570 B
Kotlin
Vendored

// The frontend resolves to the Test class.
//
// The analysis API adjusts the resolution to be the constructor as that is what the IDE expects.
//
// In this particular case, there is no PSI element for the constructor. Therefore PSI
// resolution `KtReference.resolve()` returns the KtClass for Test whereas symbol resolution
// `KtReference.resolveToSymbol` returns the KtConstructorSymbol for the Test constructor.
//
// This test is testing symbol resolution, so the resolution result is
// the constructor in Test.
open class Test
class SomeTest : <caret>Test()