FIR: introduce Java type resolve and JavaSymbolProvider #KT-24098 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
5c53bdb142
commit
02bedeca05
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.fir
|
||||
|
||||
import org.jetbrains.kotlin.fir.java.JavaSymbolProvider
|
||||
import org.jetbrains.kotlin.fir.resolve.FirProvider
|
||||
import org.jetbrains.kotlin.fir.resolve.FirQualifierResolver
|
||||
import org.jetbrains.kotlin.fir.resolve.FirSymbolProvider
|
||||
@@ -14,14 +15,14 @@ import org.jetbrains.kotlin.test.KotlinTestWithEnvironment
|
||||
|
||||
abstract class AbstractFirResolveWithSessionTestCase : KotlinTestWithEnvironment() {
|
||||
|
||||
fun createSession(): FirSession {
|
||||
open fun createSession(): FirSession {
|
||||
return object : FirSessionBase() {
|
||||
init {
|
||||
val firProvider = FirProviderImpl(this)
|
||||
registerComponent(FirProvider::class, firProvider)
|
||||
registerComponent(
|
||||
FirSymbolProvider::class,
|
||||
FirCompositeSymbolProvider(listOf(firProvider, FirLibrarySymbolProviderImpl(this)))
|
||||
FirCompositeSymbolProvider(listOf(firProvider, JavaSymbolProvider(project), FirLibrarySymbolProviderImpl(this)))
|
||||
)
|
||||
registerComponent(FirQualifierResolver::class, FirQualifierResolverImpl(this))
|
||||
registerComponent(FirTypeResolver::class, FirTypeResolverImpl())
|
||||
|
||||
@@ -41,14 +41,12 @@ public class FirResolveTestCaseGenerated extends AbstractFirResolveTestCase {
|
||||
|
||||
@TestMetadata("ft.kt")
|
||||
public void testFt() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/fir/resolve/ft.kt");
|
||||
doTest(fileName);
|
||||
runTest("compiler/testData/fir/resolve/ft.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("functionTypes.kt")
|
||||
public void testFunctionTypes() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/fir/resolve/functionTypes.kt");
|
||||
doTest(fileName);
|
||||
runTest("compiler/testData/fir/resolve/functionTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericFunctions.kt")
|
||||
@@ -76,6 +74,11 @@ public class FirResolveTestCaseGenerated extends AbstractFirResolveTestCase {
|
||||
runTest("compiler/testData/fir/resolve/simpleTypeAlias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("treeSet.kt")
|
||||
public void testTreeSet() throws Exception {
|
||||
runTest("compiler/testData/fir/resolve/treeSet.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TwoDeclarationsInSameFile.kt")
|
||||
public void testTwoDeclarationsInSameFile() throws Exception {
|
||||
runTest("compiler/testData/fir/resolve/TwoDeclarationsInSameFile.kt");
|
||||
@@ -123,8 +126,7 @@ public class FirResolveTestCaseGenerated extends AbstractFirResolveTestCase {
|
||||
|
||||
@TestMetadata("Annotations.kt")
|
||||
public void testAnnotations() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/fir/resolve/multifile/Annotations.kt");
|
||||
doTest(fileName);
|
||||
runTest("compiler/testData/fir/resolve/multifile/Annotations.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NestedSuperType.kt")
|
||||
|
||||
Reference in New Issue
Block a user