[Test] Add test for KT-54662

This commit is contained in:
Dmitriy Novozhilov
2022-10-25 10:33:39 +03:00
committed by Space Team
parent 027b1f861c
commit 1927369ae9
7 changed files with 84 additions and 0 deletions
@@ -22590,6 +22590,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt");
}
@Test
@TestMetadata("augmentedAssignForJavaSyntheticProperty.kt")
public void testAugmentedAssignForJavaSyntheticProperty() throws Exception {
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/augmentedAssignForJavaSyntheticProperty.kt");
}
@Test
@TestMetadata("compareToNullable.kt")
public void testCompareToNullable() throws Exception {
@@ -22590,6 +22590,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt");
}
@Test
@TestMetadata("augmentedAssignForJavaSyntheticProperty.kt")
public void testAugmentedAssignForJavaSyntheticProperty() throws Exception {
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/augmentedAssignForJavaSyntheticProperty.kt");
}
@Test
@TestMetadata("compareToNullable.kt")
public void testCompareToNullable() throws Exception {
@@ -22590,6 +22590,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt");
}
@Test
@TestMetadata("augmentedAssignForJavaSyntheticProperty.kt")
public void testAugmentedAssignForJavaSyntheticProperty() throws Exception {
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/augmentedAssignForJavaSyntheticProperty.kt");
}
@Test
@TestMetadata("compareToNullable.kt")
public void testCompareToNullable() throws Exception {
@@ -0,0 +1,20 @@
// WITH_STDLIB
// ISSUE: KT-54662
// FILE: Base.java
import java.util.Set;
public class Base {
public Set<Object> getDependsOn() {
return null;
}
public void setDependsOn(Iterable<?> dependsOn) {}
}
// FILE: main.kt
class Derived : Base() {
fun test(s: String) {
this.dependsOn <!ASSIGN_OPERATOR_AMBIGUITY!>+=<!> s
}
}
@@ -0,0 +1,20 @@
// WITH_STDLIB
// ISSUE: KT-54662
// FILE: Base.java
import java.util.Set;
public class Base {
public Set<Object> getDependsOn() {
return null;
}
public void setDependsOn(Iterable<?> dependsOn) {}
}
// FILE: main.kt
class Derived : Base() {
fun test(s: String) {
this.dependsOn += s
}
}
@@ -0,0 +1,20 @@
package
public open class Base {
public constructor Base()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open fun getDependsOn(): kotlin.collections.(Mutable)Set<kotlin.Any!>!
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open fun setDependsOn(/*0*/ dependsOn: kotlin.collections.(Mutable)Iterable<*>!): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public final class Derived : Base {
public constructor Derived()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun getDependsOn(): kotlin.collections.(Mutable)Set<kotlin.Any!>!
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun setDependsOn(/*0*/ dependsOn: kotlin.collections.(Mutable)Iterable<*>!): kotlin.Unit
public final fun test(/*0*/ s: kotlin.String): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -22596,6 +22596,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt");
}
@Test
@TestMetadata("augmentedAssignForJavaSyntheticProperty.kt")
public void testAugmentedAssignForJavaSyntheticProperty() throws Exception {
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/augmentedAssignForJavaSyntheticProperty.kt");
}
@Test
@TestMetadata("compareToNullable.kt")
public void testCompareToNullable() throws Exception {