[FE 1.0] Report warning about new IL operator resolve in initializers and default values

^KT-48361 Fixed
This commit is contained in:
Dmitriy Novozhilov
2021-08-23 11:36:14 +03:00
committed by TeamCityServer
parent a15a5aa429
commit 40614507d3
29 changed files with 143 additions and 35 deletions
@@ -0,0 +1,5 @@
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
fun foo(ttlMillis: Long = <!TYPE_MISMATCH!>5 * 60 * 1000<!>) {}
const val cacheSize: Long = <!TYPE_MISMATCH!>4096 * 4<!>
@@ -0,0 +1,5 @@
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
fun foo(ttlMillis: Long = <!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>5 * 60 * 1000<!>) {}
const val cacheSize: Long = <!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>4096 * 4<!>
@@ -0,0 +1,5 @@
package
public const val cacheSize: kotlin.Long = 16384.toLong()
public fun foo(/*0*/ ttlMillis: kotlin.Long = ...): kotlin.Unit
@@ -0,0 +1,7 @@
// FIR_IDENTICAL
// LANGUAGE: +ApproximateIntegerLiteralTypesInReceiverPosition
fun foo(ttlMillis: Long = <!TYPE_MISMATCH!>5 * 60 * 1000<!>) {}
const val cacheSize: Long = <!TYPE_MISMATCH!>4096 * 4<!>
@@ -0,0 +1,4 @@
package
public const val cacheSize: kotlin.Long = 16384
public fun foo(/*0*/ ttlMillis: kotlin.Long = ...): kotlin.Unit