Support mod and floorDiv extensions in constant evaluator
Ignore evaluation tests for floorDiv and mod with FIR for now.
This commit is contained in:
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
|
||||
|
||||
fun Int.mod(other: Int) = 10
|
||||
fun Int.floorDiv(other: Int): Int = 20
|
||||
|
||||
const val a1 = (-5).mod(2)
|
||||
const val b1 = 5.floorDiv(3)
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
|
||||
|
||||
fun Int.mod(other: Int) = 10
|
||||
fun Int.floorDiv(other: Int): Int = 20
|
||||
|
||||
const val a1 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>(-5).mod(2)<!>
|
||||
const val b1 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>5.floorDiv(3)<!>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package
|
||||
|
||||
public const val a1: kotlin.Int
|
||||
public const val b1: kotlin.Int
|
||||
public fun kotlin.Int.floorDiv(/*0*/ other: kotlin.Int): kotlin.Int
|
||||
public fun kotlin.Int.mod(/*0*/ other: kotlin.Int): kotlin.Int
|
||||
Reference in New Issue
Block a user