[FIR] Ensure K2 reports redundant diagnostics for default values
This commit is contained in:
committed by
Space Team
parent
8755cf75ac
commit
76fa812949
+6
@@ -24684,6 +24684,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("MultipleDefaultsAndSubstitutionOverrides.kt")
|
||||
public void testMultipleDefaultsAndSubstitutionOverrides() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndSubstitutionOverrides.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("MultipleDefaultsInSupertypesNoExplicitOverride.kt")
|
||||
public void testMultipleDefaultsInSupertypesNoExplicitOverride() throws Exception {
|
||||
|
||||
+6
@@ -24684,6 +24684,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("MultipleDefaultsAndSubstitutionOverrides.kt")
|
||||
public void testMultipleDefaultsAndSubstitutionOverrides() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndSubstitutionOverrides.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("MultipleDefaultsInSupertypesNoExplicitOverride.kt")
|
||||
public void testMultipleDefaultsInSupertypesNoExplicitOverride() throws Exception {
|
||||
|
||||
+6
@@ -24684,6 +24684,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("MultipleDefaultsAndSubstitutionOverrides.kt")
|
||||
public void testMultipleDefaultsAndSubstitutionOverrides() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndSubstitutionOverrides.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("MultipleDefaultsInSupertypesNoExplicitOverride.kt")
|
||||
public void testMultipleDefaultsInSupertypesNoExplicitOverride() throws Exception {
|
||||
|
||||
+6
@@ -24690,6 +24690,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("MultipleDefaultsAndSubstitutionOverrides.kt")
|
||||
public void testMultipleDefaultsAndSubstitutionOverrides() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndSubstitutionOverrides.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("MultipleDefaultsInSupertypesNoExplicitOverride.kt")
|
||||
public void testMultipleDefaultsInSupertypesNoExplicitOverride() throws Exception {
|
||||
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
interface A<T> {
|
||||
fun foo(x: Int = 42): Int
|
||||
}
|
||||
|
||||
open class B<K> {
|
||||
fun foo(x: Int = 239) = x
|
||||
}
|
||||
|
||||
interface C<E> {
|
||||
fun foo(x: Int): Int
|
||||
}
|
||||
|
||||
open <!MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES_WHEN_NO_EXPLICIT_OVERRIDE!>class Z<!><R> : A<R>, B<R>(), C<R>
|
||||
|
||||
<!MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES_WHEN_NO_EXPLICIT_OVERRIDE_DEPRECATION_WARNING!>class N<!><W> : Z<W>()
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
interface A<T> {
|
||||
fun foo(x: Int = 42): Int
|
||||
}
|
||||
|
||||
open class B<K> {
|
||||
fun foo(x: Int = 239) = x
|
||||
}
|
||||
|
||||
interface C<E> {
|
||||
fun foo(x: Int): Int
|
||||
}
|
||||
|
||||
open <!MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES_WHEN_NO_EXPLICIT_OVERRIDE!>class Z<!><R> : A<R>, B<R>(), C<R>
|
||||
|
||||
class N<W> : Z<W>()
|
||||
Generated
+6
@@ -26472,6 +26472,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("MultipleDefaultsAndSubstitutionOverrides.kt")
|
||||
public void testMultipleDefaultsAndSubstitutionOverrides() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndSubstitutionOverrides.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("MultipleDefaultsInSupertypesNoExplicitOverride.kt")
|
||||
public void testMultipleDefaultsInSupertypesNoExplicitOverride() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user