[LL] find fir by psi: allow fallthrough to traverse tree for invalid code
In case of broken code e.g., duplicated classes provider would return first class, though we definitely need some code insight in this case at least to add navigation fixes, etc. Similar to this, a file copy is created during completion, where additional elements might appear and we need to search for them. Added test cases for duplicated classes.
This commit is contained in:
+6
@@ -64,6 +64,12 @@ public class Fe10IdeNormalAnalysisSourceModuleAnalysisApiPsiTypeProviderTestGene
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/anonymousObject_exposedAsReturnValue.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("duplicatedClass_functionParameter.kt")
|
||||
public void testDuplicatedClass_functionParameter() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/duplicatedClass_functionParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("errorTypeInNestedTypeArgument.kt")
|
||||
public void testErrorTypeInNestedTypeArgument() throws Exception {
|
||||
|
||||
+6
@@ -64,6 +64,12 @@ public class FirIdeDependentAnalysisSourceModuleAnalysisApiPsiTypeProviderTestGe
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/anonymousObject_exposedAsReturnValue.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("duplicatedClass_functionParameter.kt")
|
||||
public void testDuplicatedClass_functionParameter() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/duplicatedClass_functionParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("errorTypeInNestedTypeArgument.kt")
|
||||
public void testErrorTypeInNestedTypeArgument() throws Exception {
|
||||
|
||||
+6
@@ -64,6 +64,12 @@ public class FirIdeNormalAnalysisSourceModuleAnalysisApiPsiTypeProviderTestGener
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/anonymousObject_exposedAsReturnValue.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("duplicatedClass_functionParameter.kt")
|
||||
public void testDuplicatedClass_functionParameter() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/duplicatedClass_functionParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("errorTypeInNestedTypeArgument.kt")
|
||||
public void testErrorTypeInNestedTypeArgument() throws Exception {
|
||||
|
||||
+6
@@ -64,6 +64,12 @@ public class FirStandaloneNormalAnalysisSourceModuleAnalysisApiPsiTypeProviderTe
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/anonymousObject_exposedAsReturnValue.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("duplicatedClass_functionParameter.kt")
|
||||
public void testDuplicatedClass_functionParameter() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/duplicatedClass_functionParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("errorTypeInNestedTypeArgument.kt")
|
||||
public void testErrorTypeInNestedTypeArgument() throws Exception {
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class SomeClass {
|
||||
val prop = "abc"
|
||||
}
|
||||
class SomeClass {
|
||||
fun foo(<caret>p: Int) {}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
KtType: kotlin.Int
|
||||
PsiType: PsiType:int
|
||||
+7
-30
@@ -127,11 +127,11 @@ private fun KtDeclaration.findSourceNonLocalFirDeclarationByProvider(
|
||||
}
|
||||
this is KtScript -> containerFirFile?.declarations?.singleOrNull { it is FirScript }
|
||||
this is KtPropertyAccessor -> {
|
||||
val firPropertyDeclaration = property.nonLocalFirDeclaration<FirVariable>(
|
||||
val firPropertyDeclaration = property.findSourceNonLocalFirDeclarationByProvider(
|
||||
firFileBuilder,
|
||||
provider,
|
||||
containerFirFile,
|
||||
)
|
||||
) as? FirVariable ?: return null
|
||||
|
||||
if (isGetter) {
|
||||
firPropertyDeclaration.getter
|
||||
@@ -143,11 +143,11 @@ private fun KtDeclaration.findSourceNonLocalFirDeclarationByProvider(
|
||||
val ownerFunction = ownerFunction
|
||||
?: errorWithFirSpecificEntries("Containing function should be not null for KtParameter", psi = this)
|
||||
|
||||
val firFunctionDeclaration = ownerFunction.nonLocalFirDeclaration<FirFunction>(
|
||||
val firFunctionDeclaration = ownerFunction.findSourceNonLocalFirDeclarationByProvider(
|
||||
firFileBuilder,
|
||||
provider,
|
||||
containerFirFile,
|
||||
)
|
||||
) as? FirFunction ?: return null
|
||||
|
||||
firFunctionDeclaration.valueParameters[parameterIndex()]
|
||||
}
|
||||
@@ -155,42 +155,19 @@ private fun KtDeclaration.findSourceNonLocalFirDeclarationByProvider(
|
||||
val declaration = containingDeclaration
|
||||
?: errorWithFirSpecificEntries("Containing declaration should be not null for KtTypeParameter", psi = this)
|
||||
|
||||
val firTypeParameterOwner = declaration.nonLocalFirDeclaration<FirTypeParameterRefsOwner>(
|
||||
val firTypeParameterOwner = declaration.findSourceNonLocalFirDeclarationByProvider(
|
||||
firFileBuilder,
|
||||
provider,
|
||||
containerFirFile,
|
||||
)
|
||||
) as? FirTypeParameterRefsOwner ?: return null
|
||||
|
||||
val index = (parent as KtTypeParameterList).parameters.indexOf(this)
|
||||
firTypeParameterOwner.typeParameters[index] as FirDeclaration
|
||||
firTypeParameterOwner.typeParameters.firstOrNull { it.psi == this } as FirDeclaration
|
||||
}
|
||||
else -> errorWithFirSpecificEntries("Invalid container", psi = this)
|
||||
}
|
||||
return candidate?.takeIf { it.realPsi == this }
|
||||
}
|
||||
|
||||
private inline fun <reified T> KtDeclaration.nonLocalFirDeclaration(
|
||||
firFileBuilder: LLFirFileBuilder,
|
||||
provider: FirProvider,
|
||||
containerFirFile: FirFile?,
|
||||
): T {
|
||||
val firResult = findSourceNonLocalFirDeclarationByProvider(
|
||||
firFileBuilder,
|
||||
provider,
|
||||
containerFirFile,
|
||||
)
|
||||
|
||||
if (firResult !is T) {
|
||||
errorWithFirSpecificEntries(
|
||||
"${T::class.simpleName} for ${this::class.simpleName} declaration is not found",
|
||||
psi = this,
|
||||
fir = firResult,
|
||||
)
|
||||
}
|
||||
|
||||
return firResult
|
||||
}
|
||||
|
||||
fun FirAnonymousInitializer.containingClass(): FirRegularClass {
|
||||
val dispatchReceiverType = this.dispatchReceiverType as? ConeLookupTagBasedType
|
||||
?: error("dispatchReceiverType for FirAnonymousInitializer modifier cannot be null")
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class SomeClass {
|
||||
val prop = "abc"
|
||||
}
|
||||
class SomeClass {
|
||||
<expr>fun foo() {}</expr>
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
KT element: KtNamedFunction
|
||||
FIR element: FirSimpleFunctionImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
class SomeClass {
|
||||
val prop = "abc"
|
||||
}
|
||||
class SomeClass {
|
||||
fun foo(<expr>p: Int</expr>) {}
|
||||
}
|
||||
analysis/low-level-api-fir/testdata/getOrBuildFir/invalidCode/duplicatedClassesFunctionParameter.txt
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
KT element: KtParameter
|
||||
FIR element: FirValueParameterImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
[ResolvedTo(BODY_RESOLVE)] p: R|kotlin/Int|
|
||||
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
class MyClass<Type> {
|
||||
inner class Second<Typ<caret>e2> {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
RAW_FIR:
|
||||
FILE: [ResolvedTo(RAW_FIR)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyClass<[ResolvedTo(RAW_FIR)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(RAW_FIR)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? inner [ResolvedTo(RAW_FIR)] class Second<[ResolvedTo(RAW_FIR)] Type2, [ResolvedTo(RAW_FIR)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(RAW_FIR)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
IMPORTS:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyClass<[ResolvedTo(RAW_FIR)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(RAW_FIR)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? inner [ResolvedTo(RAW_FIR)] class Second<[ResolvedTo(RAW_FIR)] Type2, [ResolvedTo(RAW_FIR)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(RAW_FIR)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
COMPILER_REQUIRED_ANNOTATIONS:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyClass<[ResolvedTo(RAW_FIR)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(RAW_FIR)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? inner [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] class Second<[ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] Type2, [ResolvedTo(RAW_FIR)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
COMPANION_GENERATION:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyClass<[ResolvedTo(RAW_FIR)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(RAW_FIR)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? inner [ResolvedTo(COMPANION_GENERATION)] class Second<[ResolvedTo(COMPANION_GENERATION)] Type2, [ResolvedTo(RAW_FIR)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(COMPANION_GENERATION)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SUPER_TYPES:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public? final? [ResolvedTo(SUPER_TYPES)] class MyClass<[ResolvedTo(SUPER_TYPES)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(SUPER_TYPES)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? inner [ResolvedTo(SUPER_TYPES)] class Second<[ResolvedTo(SUPER_TYPES)] Type2, [ResolvedTo(SUPER_TYPES)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(SUPER_TYPES)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TYPES:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public? final? [ResolvedTo(TYPES)] class MyClass<[ResolvedTo(TYPES)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(TYPES)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? inner [ResolvedTo(TYPES)] class Second<[ResolvedTo(TYPES)] Type2, [ResolvedTo(TYPES)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(TYPES)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
STATUS:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class MyClass<[ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(STATUS)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final inner [ResolvedTo(STATUS)] class Second<[ResolvedTo(STATUS)] Type2, [ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(STATUS)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
EXPECT_ACTUAL_MATCHING:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class MyClass<[ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(STATUS)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final inner [ResolvedTo(EXPECT_ACTUAL_MATCHING)] class Second<[ResolvedTo(EXPECT_ACTUAL_MATCHING)] Type2, [ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(EXPECT_ACTUAL_MATCHING)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ARGUMENTS_OF_ANNOTATIONS:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class MyClass<[ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(STATUS)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final inner [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] class Second<[ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] Type2, [ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CONTRACTS:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class MyClass<[ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(STATUS)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final inner [ResolvedTo(CONTRACTS)] class Second<[ResolvedTo(CONTRACTS)] Type2, [ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(CONTRACTS)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
IMPLICIT_TYPES_BODY_RESOLVE:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class MyClass<[ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(STATUS)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final inner [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] class Second<[ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] Type2, [ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ANNOTATIONS_ARGUMENTS_MAPPING:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class MyClass<[ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(STATUS)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final inner [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] class Second<[ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] Type2, [ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BODY_RESOLVE:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class MyClass<[ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(STATUS)] Type>(): R|MyClass<Type>| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final inner [ResolvedTo(BODY_RESOLVE)] class Second<[ResolvedTo(BODY_RESOLVE)] Type2, [ResolvedTo(STATUS)] Type> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(BODY_RESOLVE)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FILE RAW TO BODY:
|
||||
FILE: [ResolvedTo(IMPORTS)] typeParameterOfClass2.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public final [ResolvedTo(BODY_RESOLVE)] class MyClass<[ResolvedTo(BODY_RESOLVE)] Type> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] constructor<[ResolvedTo(BODY_RESOLVE)] Type>(): R|MyClass<Type>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final inner [ResolvedTo(BODY_RESOLVE)] class Second<[ResolvedTo(BODY_RESOLVE)] Type2, [ResolvedTo(BODY_RESOLVE)] Type> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Second] MyClass<Type>.constructor<[ResolvedTo(BODY_RESOLVE)] Type2>(): R|MyClass.Second<Type2, Type>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+6
@@ -444,6 +444,12 @@ public class FirOutOfContentRootLazyDeclarationResolveTestGenerated extends Abst
|
||||
runTest("analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParameterOfClass2.kt")
|
||||
public void testTypeParameterOfClass2() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfClass2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParameterOfNonLocalFunction.kt")
|
||||
public void testTypeParameterOfNonLocalFunction() throws Exception {
|
||||
|
||||
+6
@@ -444,6 +444,12 @@ public class FirSourceLazyDeclarationResolveTestGenerated extends AbstractFirSou
|
||||
runTest("analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParameterOfClass2.kt")
|
||||
public void testTypeParameterOfClass2() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfClass2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParameterOfNonLocalFunction.kt")
|
||||
public void testTypeParameterOfNonLocalFunction() throws Exception {
|
||||
|
||||
+12
@@ -805,6 +805,18 @@ public class OutOfContentRootGetOrBuildFirTestGenerated extends AbstractOutOfCon
|
||||
runTest("analysis/low-level-api-fir/testdata/getOrBuildFir/invalidCode/delegatedProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("duplicatedClasses.kt")
|
||||
public void testDuplicatedClasses() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testdata/getOrBuildFir/invalidCode/duplicatedClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("duplicatedClassesFunctionParameter.kt")
|
||||
public void testDuplicatedClassesFunctionParameter() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testdata/getOrBuildFir/invalidCode/duplicatedClassesFunctionParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("incompletePropertyWithAnnotation.kt")
|
||||
public void testIncompletePropertyWithAnnotation() throws Exception {
|
||||
|
||||
+12
@@ -805,6 +805,18 @@ public class SourceGetOrBuildFirTestGenerated extends AbstractSourceGetOrBuildFi
|
||||
runTest("analysis/low-level-api-fir/testdata/getOrBuildFir/invalidCode/delegatedProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("duplicatedClasses.kt")
|
||||
public void testDuplicatedClasses() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testdata/getOrBuildFir/invalidCode/duplicatedClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("duplicatedClassesFunctionParameter.kt")
|
||||
public void testDuplicatedClassesFunctionParameter() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testdata/getOrBuildFir/invalidCode/duplicatedClassesFunctionParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("incompletePropertyWithAnnotation.kt")
|
||||
public void testIncompletePropertyWithAnnotation() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user