IDELightClassContexts: @PublishedApi affects codegen
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
public final class A {
|
||||
public final void test() { /* compiled code */ }
|
||||
|
||||
@kotlin.PublishedApi
|
||||
public final int access$test(int p) { /* compiled code */ }
|
||||
|
||||
public A() { /* compiled code */ }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// A
|
||||
class A {
|
||||
inline fun test() {
|
||||
{
|
||||
`access$test`(1)
|
||||
}()
|
||||
}
|
||||
|
||||
@PublishedApi
|
||||
internal fun `access$test`(p: Int) = p
|
||||
}
|
||||
@@ -78,6 +78,12 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PublishedApi.kt")
|
||||
public void testPublishedApi() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/asJava/lightClasses/compilationErrors")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+1
-1
@@ -246,7 +246,7 @@ object IDELightClassContexts {
|
||||
private val annotationsThatAffectCodegen = listOf(
|
||||
"JvmField", "JvmOverloads", "JvmName", "JvmStatic",
|
||||
"Synchronized", "Transient", "Volatile", "Strictfp"
|
||||
).map { FqName("kotlin.jvm").child(Name.identifier(it)) }
|
||||
).map { FqName("kotlin.jvm").child(Name.identifier(it)) } + FqName("kotlin.PublishedApi")
|
||||
|
||||
class AdHocAnnotationResolver(
|
||||
private val moduleDescriptor: ModuleDescriptor,
|
||||
|
||||
+6
@@ -78,6 +78,12 @@ public class IdeCompiledLightClassTestGenerated extends AbstractIdeCompiledLight
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PublishedApi.kt")
|
||||
public void testPublishedApi() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/asJava/lightClasses/delegation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
@@ -78,6 +78,12 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PublishedApi.kt")
|
||||
public void testPublishedApi() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/PublishedApi.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/asJava/lightClasses/compilationErrors")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user