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:
Denis Zharkov
2014-07-21 13:12:13 +04:00
committed by Evgeny Gerashchenko
parent 2b67716e95
commit 76845a76b9
3 changed files with 54 additions and 0 deletions
@@ -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");