[SLC] Ignore callables with invalid or absent names (KTIJ-23584)
This commit is contained in:
+3
-3
@@ -193,9 +193,8 @@ internal fun SymbolLightClassBase.createMethods(
|
||||
when (declaration) {
|
||||
is KtFunctionSymbol -> {
|
||||
// TODO: check if it has expect modifier
|
||||
if (declaration.hasReifiedParameters ||
|
||||
declaration.isHiddenOrSynthetic()
|
||||
) return
|
||||
if (declaration.hasReifiedParameters || declaration.isHiddenOrSynthetic()) return
|
||||
if (declaration.name.isSpecial) return
|
||||
|
||||
result.add(
|
||||
SymbolLightSimpleMethod(
|
||||
@@ -272,6 +271,7 @@ internal fun SymbolLightClassBase.createPropertyAccessors(
|
||||
) {
|
||||
if (declaration is KtKotlinPropertySymbol && declaration.isConst) return
|
||||
if (declaration.origin == KtSymbolOrigin.SOURCE_MEMBER_GENERATED) return
|
||||
if (declaration.name.isSpecial) return
|
||||
|
||||
if (declaration.visibility.isPrivateOrPrivateToThis() &&
|
||||
declaration.getter?.hasBody == false &&
|
||||
|
||||
+12
@@ -285,6 +285,12 @@ public class SymbolLightClassesForSourceTestGenerated extends AbstractSymbolLigh
|
||||
runTest("compiler/testData/asJava/lightClasses/compilationErrors/ExpectedNestedClassInObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("FunctionWithoutName.kt")
|
||||
public void testFunctionWithoutName() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/compilationErrors/FunctionWithoutName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("JvmPackageName.kt")
|
||||
public void testJvmPackageName() throws Exception {
|
||||
@@ -303,6 +309,12 @@ public class SymbolLightClassesForSourceTestGenerated extends AbstractSymbolLigh
|
||||
runTest("compiler/testData/asJava/lightClasses/compilationErrors/PrivateInTrait.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("PropertyWithoutName.kt")
|
||||
public void testPropertyWithoutName() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/compilationErrors/PropertyWithoutName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("RepetableAnnotations.kt")
|
||||
public void testRepetableAnnotations() throws Exception {
|
||||
|
||||
+12
@@ -285,6 +285,12 @@ public class SymbolLightClassesParentingForSourceTestGenerated extends AbstractS
|
||||
runTest("compiler/testData/asJava/lightClasses/compilationErrors/ExpectedNestedClassInObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("FunctionWithoutName.kt")
|
||||
public void testFunctionWithoutName() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/compilationErrors/FunctionWithoutName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("JvmPackageName.kt")
|
||||
public void testJvmPackageName() throws Exception {
|
||||
@@ -303,6 +309,12 @@ public class SymbolLightClassesParentingForSourceTestGenerated extends AbstractS
|
||||
runTest("compiler/testData/asJava/lightClasses/compilationErrors/PrivateInTrait.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("PropertyWithoutName.kt")
|
||||
public void testPropertyWithoutName() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/compilationErrors/PropertyWithoutName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("RepetableAnnotations.kt")
|
||||
public void testRepetableAnnotations() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user