Fixed KT-4814: check type when a += b is a = a+b
In cases when a += b is a = a + b, check that (a+b) can be safely casted to a
This commit is contained in:
committed by
Evgeny Gerashchenko
parent
2b67716e95
commit
76845a76b9
@@ -5909,6 +5909,11 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest("compiler/testData/diagnostics/tests/operatorsOverloading/AssignmentOperations.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("assignmentOperationsCheckReturnType.kt")
|
||||
public void testAssignmentOperationsCheckReturnType() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("IteratorAmbiguity.kt")
|
||||
public void testIteratorAmbiguity() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/operatorsOverloading/IteratorAmbiguity.kt");
|
||||
|
||||
Reference in New Issue
Block a user