FE: reproduce KT-58757

This commit is contained in:
Mikhail Glukhikh
2023-05-19 17:24:04 +02:00
committed by Space Team
parent ee1608ec99
commit c130786889
7 changed files with 50 additions and 0 deletions
@@ -18875,6 +18875,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/localFun.kt");
}
@Test
@TestMetadata("protectedInlineInsideInternal.kt")
public void testProtectedInlineInsideInternal() throws Exception {
runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/protectedInlineInsideInternal.kt");
}
@Test
@TestMetadata("publishedApi.kt")
public void testPublishedApi() throws Exception {
@@ -18875,6 +18875,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/localFun.kt");
}
@Test
@TestMetadata("protectedInlineInsideInternal.kt")
public void testProtectedInlineInsideInternal() throws Exception {
runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/protectedInlineInsideInternal.kt");
}
@Test
@TestMetadata("publishedApi.kt")
public void testPublishedApi() throws Exception {
@@ -18875,6 +18875,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/localFun.kt");
}
@Test
@TestMetadata("protectedInlineInsideInternal.kt")
public void testProtectedInlineInsideInternal() throws Exception {
runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/protectedInlineInsideInternal.kt");
}
@Test
@TestMetadata("publishedApi.kt")
public void testPublishedApi() throws Exception {
@@ -18881,6 +18881,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/localFun.kt");
}
@Test
@TestMetadata("protectedInlineInsideInternal.kt")
public void testProtectedInlineInsideInternal() throws Exception {
runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/protectedInlineInsideInternal.kt");
}
@Test
@TestMetadata("publishedApi.kt")
public void testPublishedApi() throws Exception {
@@ -0,0 +1,10 @@
// ISSUE: KT-58757
internal abstract class Foo {
abstract val context: CharSequence
}
internal abstract class Bar(protected val foo: Foo) {
protected inline val inlineContext: String
get() = <!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>foo<!>.<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>context<!> as String
}
@@ -0,0 +1,10 @@
// ISSUE: KT-58757
internal abstract class Foo {
abstract val context: CharSequence
}
internal abstract class Bar(protected val foo: Foo) {
protected inline val inlineContext: String
get() = foo.context as String
}
@@ -18881,6 +18881,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/localFun.kt");
}
@Test
@TestMetadata("protectedInlineInsideInternal.kt")
public void testProtectedInlineInsideInternal() throws Exception {
runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/protectedInlineInsideInternal.kt");
}
@Test
@TestMetadata("publishedApi.kt")
public void testPublishedApi() throws Exception {