[FE 1.0] Properly report INTEGER_OPERATOR_RESOLVE_WILL_CHANGE

^KT-38895
This commit is contained in:
Dmitriy Novozhilov
2021-11-10 16:09:58 +03:00
committed by teamcity
parent 21444d6be8
commit 62b774b2e3
26 changed files with 126 additions and 131 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition +ReportChangingIntegerOperatorResolve
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// ISSUE: Kt-47447, KT-47729
fun takeLong(value : Long) {}
@@ -11,10 +11,10 @@ fun <A> takeGeneric(value : A) {}
fun <A> takeGenericX(value : A?) {}
fun test_1() {
takeLong(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 + 1<!>) // warning
takeLong(1 + 1) // ok
takeInt(1 + 1) // ok
takeAny(1 + 1) // ok
takeLongX(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 + 1<!>) // warning
takeLongX(1 + 1) // ok
takeIntX(1 + 1) // ok
takeAnyX(1 + 1) // ok
takeGeneric(1 + 1) // ok