[FE 1.0] Disable INTEGER_OPERATOR_RESOLVE_WILL_CHANGE warning by default

Also remove sinceVersion parameter from
  ApproximateIntegerLiteralTypesInReceiverPosition language feature

^KT-48992 Fixed
This commit is contained in:
Dmitriy Novozhilov
2021-09-29 11:50:17 +03:00
committed by TeamCityServer
parent 212c3e8d51
commit 7917e511ed
28 changed files with 133 additions and 127 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition +ReportChangingIntegerOperatorResolve
// ISSUE: Kt-47447, KT-47729
fun takeLong(value : Long) {}
+1 -1
View File
@@ -1,4 +1,4 @@
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition +ReportChangingIntegerOperatorResolve
// ISSUE: Kt-47447, KT-47729
fun takeLong(value : Long) {}
@@ -1,4 +1,4 @@
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition +ReportChangingIntegerOperatorResolve
// ISSUE: Kt-47447, KT-47729
fun takeLong(x: Long) {}
@@ -1,4 +1,4 @@
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition +ReportChangingIntegerOperatorResolve
// ISSUE: Kt-47447, KT-47729
fun takeLong(x: Long) {}
@@ -1,4 +1,4 @@
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition +ReportChangingIntegerOperatorResolve
fun foo(ttlMillis: Long = <!TYPE_MISMATCH!>5 * 60 * 1000<!>) {}
@@ -1,4 +1,4 @@
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition +ReportChangingIntegerOperatorResolve
fun foo(ttlMillis: Long = <!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>5 * 60 * 1000<!>) {}
@@ -7,62 +7,62 @@ abstract class C<L> {
}
fun testLongDotCall(c1: C<Long>) {
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.plus(2)<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.minus(2)<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.times(2)<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.div(2)<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.rem(2)<!>)
c1.takeT(1.plus(2))
c1.takeT(1.minus(2))
c1.takeT(1.times(2))
c1.takeT(1.div(2))
c1.takeT(1.rem(2))
c1.takeT(<!TYPE_MISMATCH!>1.inc()<!>)
c1.takeT(<!TYPE_MISMATCH!>1.dec()<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.unaryPlus()<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.unaryMinus()<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.shl(2)<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.shr(2)<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.ushr(2)<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.and(2)<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.or(2)<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.xor(2)<!>)
c1.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.inv()<!>)
c1.takeT(1.unaryPlus())
c1.takeT(1.unaryMinus())
c1.takeT(1.shl(2))
c1.takeT(1.shr(2))
c1.takeT(1.ushr(2))
c1.takeT(1.and(2))
c1.takeT(1.or(2))
c1.takeT(1.xor(2))
c1.takeT(1.inv())
}
fun testShortDotCall(c2: C<Short>) {
c2.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.plus(2)<!>)
c2.takeT(1.plus(2))
c2.takeT(<!TYPE_MISMATCH!>1.inc()<!>)
c2.takeT(<!TYPE_MISMATCH!>1.dec()<!>)
c2.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.shr(2)<!>)
c2.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.inv()<!>)
c2.takeT(1.shr(2))
c2.takeT(1.inv())
}
fun testByteDotCall(c3: C<Byte>) {
c3.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.plus(2)<!>)
c3.takeT(1.plus(2))
c3.takeT(<!TYPE_MISMATCH!>1.inc()<!>)
c3.takeT(<!TYPE_MISMATCH!>1.dec()<!>)
c3.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.shr(2)<!>)
c3.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1.inv()<!>)
c3.takeT(1.shr(2))
c3.takeT(1.inv())
}
fun testLongOperatorInfixCall(c4: C<Long>) {
c4.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 + 2<!>)
c4.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 - 2<!>)
c4.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 * 2<!>)
c4.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 / 2<!>)
c4.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 % 2<!>)
c4.takeT(1 + 2)
c4.takeT(1 - 2)
c4.takeT(1 * 2)
c4.takeT(1 / 2)
c4.takeT(1 % 2)
c4.takeT(+1)
c4.takeT(-1)
c4.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 shl 2<!>)
c4.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 shr 2<!>)
c4.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 ushr 2<!>)
c4.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 and 2<!>)
c4.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 or 2<!>)
c4.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 xor 2<!>)
c4.takeT(1 shl 2)
c4.takeT(1 shr 2)
c4.takeT(1 ushr 2)
c4.takeT(1 and 2)
c4.takeT(1 or 2)
c4.takeT(1 xor 2)
}
fun testShortOperatorInfixCall(c5: C<Short>) {
c5.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 + 2<!>)
c5.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 shr 2<!>)
c5.takeT(1 + 2)
c5.takeT(1 shr 2)
}
fun testByteOperatorInfixCall(c6: C<Byte>) {
c6.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 + 2<!>)
c6.takeT(<!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 shr 2<!>)
c6.takeT(1 + 2)
c6.takeT(1 shr 2)
}
@@ -1,4 +1,4 @@
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition +ReportChangingIntegerOperatorResolve
// WITH_STDLIB
// ISSUE: KT-38895
@@ -1,4 +1,4 @@
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition +ReportChangingIntegerOperatorResolve
// WITH_STDLIB
// ISSUE: KT-38895