FE: add tests reproducing KT-57854
This commit is contained in:
committed by
Space Team
parent
a3d45964f3
commit
04812332f9
+12
@@ -14882,6 +14882,18 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("receiverTypeMismatch_withProper.kt")
|
||||||
|
public void testReceiverTypeMismatch_withProper() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/receiverTypeMismatch_withProper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("receiverTypeMismatch_withoutProper.kt")
|
||||||
|
public void testReceiverTypeMismatch_withoutProper() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/receiverTypeMismatch_withoutProper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
||||||
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
||||||
|
|||||||
+12
@@ -14882,6 +14882,18 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("receiverTypeMismatch_withProper.kt")
|
||||||
|
public void testReceiverTypeMismatch_withProper() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/receiverTypeMismatch_withProper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("receiverTypeMismatch_withoutProper.kt")
|
||||||
|
public void testReceiverTypeMismatch_withoutProper() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/receiverTypeMismatch_withoutProper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
||||||
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
||||||
|
|||||||
+12
@@ -14882,6 +14882,18 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("receiverTypeMismatch_withProper.kt")
|
||||||
|
public void testReceiverTypeMismatch_withProper() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/receiverTypeMismatch_withProper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("receiverTypeMismatch_withoutProper.kt")
|
||||||
|
public void testReceiverTypeMismatch_withoutProper() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/receiverTypeMismatch_withoutProper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
||||||
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
||||||
|
|||||||
+12
@@ -14888,6 +14888,18 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("receiverTypeMismatch_withProper.kt")
|
||||||
|
public void testReceiverTypeMismatch_withProper() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/receiverTypeMismatch_withProper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("receiverTypeMismatch_withoutProper.kt")
|
||||||
|
public void testReceiverTypeMismatch_withoutProper() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/receiverTypeMismatch_withoutProper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
||||||
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
||||||
|
|||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
// LANGUAGE: +ProperTypeInferenceConstraintsProcessing
|
||||||
|
|
||||||
|
// FILE: Configuration.java
|
||||||
|
public class Configuration<S extends State<? extends Configuration<S>>> {
|
||||||
|
public String getDirectoryPath() { return ""; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: State.java
|
||||||
|
public class State<C extends Configuration<? extends State<C>>> {}
|
||||||
|
|
||||||
|
// FILE: Main.kt
|
||||||
|
fun setup(configuration: Configuration<*>) {
|
||||||
|
configuration.apply {
|
||||||
|
directoryPath
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
// LANGUAGE: +ProperTypeInferenceConstraintsProcessing
|
||||||
|
|
||||||
|
// FILE: Configuration.java
|
||||||
|
public class Configuration<S extends State<? extends Configuration<S>>> {
|
||||||
|
public String getDirectoryPath() { return ""; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: State.java
|
||||||
|
public class State<C extends Configuration<? extends State<C>>> {}
|
||||||
|
|
||||||
|
// FILE: Main.kt
|
||||||
|
fun setup(configuration: Configuration<*>) {
|
||||||
|
configuration.apply {
|
||||||
|
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>directoryPath<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
// LANGUAGE: -ProperTypeInferenceConstraintsProcessing
|
||||||
|
|
||||||
|
// FILE: Configuration.java
|
||||||
|
public class Configuration<S extends State<? extends Configuration<S>>> {
|
||||||
|
public String getDirectoryPath() { return ""; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: State.java
|
||||||
|
public class State<C extends Configuration<? extends State<C>>> {}
|
||||||
|
|
||||||
|
// FILE: Main.kt
|
||||||
|
fun setup(configuration: Configuration<*>) {
|
||||||
|
configuration.apply {
|
||||||
|
directoryPath
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
// LANGUAGE: -ProperTypeInferenceConstraintsProcessing
|
||||||
|
|
||||||
|
// FILE: Configuration.java
|
||||||
|
public class Configuration<S extends State<? extends Configuration<S>>> {
|
||||||
|
public String getDirectoryPath() { return ""; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: State.java
|
||||||
|
public class State<C extends Configuration<? extends State<C>>> {}
|
||||||
|
|
||||||
|
// FILE: Main.kt
|
||||||
|
fun setup(configuration: Configuration<*>) {
|
||||||
|
configuration.apply {
|
||||||
|
<!RECEIVER_TYPE_MISMATCH!>directoryPath<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+12
@@ -14888,6 +14888,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("receiverTypeMismatch_withProper.kt")
|
||||||
|
public void testReceiverTypeMismatch_withProper() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/receiverTypeMismatch_withProper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("receiverTypeMismatch_withoutProper.kt")
|
||||||
|
public void testReceiverTypeMismatch_withoutProper() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/receiverTypeMismatch_withoutProper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
@TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt")
|
||||||
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user