K2: reproduce some situations related to KT-62134
This commit is contained in:
committed by
Space Team
parent
36dd9b6818
commit
3c3396a87e
+6
@@ -40802,6 +40802,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/visibility/privateToThis.kt");
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThis.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("privateToThisExotic.kt")
|
||||||
|
public void testPrivateToThisExotic() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("protectedInternal.kt")
|
@TestMetadata("protectedInternal.kt")
|
||||||
public void testProtectedInternal() throws Exception {
|
public void testProtectedInternal() throws Exception {
|
||||||
|
|||||||
+6
@@ -40802,6 +40802,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/visibility/privateToThis.kt");
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThis.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("privateToThisExotic.kt")
|
||||||
|
public void testPrivateToThisExotic() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("protectedInternal.kt")
|
@TestMetadata("protectedInternal.kt")
|
||||||
public void testProtectedInternal() throws Exception {
|
public void testProtectedInternal() throws Exception {
|
||||||
|
|||||||
+6
@@ -38446,6 +38446,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/visibility/privateToThis.kt");
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThis.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("privateToThisExotic.kt")
|
||||||
|
public void testPrivateToThisExotic() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("protectedInternal.kt")
|
@TestMetadata("protectedInternal.kt")
|
||||||
public void testProtectedInternal() throws Exception {
|
public void testProtectedInternal() throws Exception {
|
||||||
|
|||||||
+6
@@ -38572,6 +38572,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/visibility/privateToThis.kt");
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThis.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("privateToThisExotic.kt")
|
||||||
|
public void testPrivateToThisExotic() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("protectedInternal.kt")
|
@TestMetadata("protectedInternal.kt")
|
||||||
public void testProtectedInternal() throws Exception {
|
public void testProtectedInternal() throws Exception {
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
// ISSUE: KT-62134
|
||||||
|
|
||||||
|
// FILE: Base.java
|
||||||
|
|
||||||
|
public class Base<T> {
|
||||||
|
public T foo() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
class Bar
|
||||||
|
|
||||||
|
class Foo<in T> : Base<<!TYPE_VARIANCE_CONFLICT_ERROR!>T<!>>() {
|
||||||
|
|
||||||
|
private val dnn: T & Any = TODO()
|
||||||
|
|
||||||
|
private val flex = foo()
|
||||||
|
|
||||||
|
fun bar(f: Foo<Bar>) {
|
||||||
|
val dnn = f.dnn
|
||||||
|
val flex = f.flex
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
// ISSUE: KT-62134
|
||||||
|
|
||||||
|
// FILE: Base.java
|
||||||
|
|
||||||
|
public class Base<T> {
|
||||||
|
public T foo() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
class Bar
|
||||||
|
|
||||||
|
class Foo<in T> : Base<<!TYPE_VARIANCE_CONFLICT_ERROR!>T<!>>() {
|
||||||
|
|
||||||
|
private val dnn: T & Any = TODO()
|
||||||
|
|
||||||
|
private val flex = foo()
|
||||||
|
|
||||||
|
fun bar(f: Foo<Bar>) {
|
||||||
|
val dnn = f.<!INVISIBLE_MEMBER!>dnn<!>
|
||||||
|
val flex = f.<!INVISIBLE_MEMBER!>flex<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+6
@@ -40802,6 +40802,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/visibility/privateToThis.kt");
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThis.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("privateToThisExotic.kt")
|
||||||
|
public void testPrivateToThisExotic() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("protectedInternal.kt")
|
@TestMetadata("protectedInternal.kt")
|
||||||
public void testProtectedInternal() throws Exception {
|
public void testProtectedInternal() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user