Do not apply constant folding for non built-in functions
#KT-15872 Fixed
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
|
||||
|
||||
infix fun Int.rem(other: Int) = 10
|
||||
infix operator fun Int.minus(other: Int): Int = 20
|
||||
|
||||
const val a1 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>(-5) rem 2<!>
|
||||
const val a2 = (-5).rem(2)
|
||||
|
||||
const val b1 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>5 minus 3<!>
|
||||
const val b2 = 5.minus(3)
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package
|
||||
|
||||
public const val a1: kotlin.Int
|
||||
public const val a2: kotlin.Int = -1
|
||||
public const val b1: kotlin.Int
|
||||
public const val b2: kotlin.Int = 2
|
||||
public operator infix fun kotlin.Int.minus(/*0*/ other: kotlin.Int): kotlin.Int
|
||||
public infix fun kotlin.Int.rem(/*0*/ other: kotlin.Int): kotlin.Int
|
||||
Reference in New Issue
Block a user