Files
kotlin-fork/compiler/testData/diagnostics/tests/evaluate/customExtensionOverKotlinExtensionInConst.fir.kt
T
Ilya Gorbunov 9cc8f44390 Support mod and floorDiv extensions in constant evaluator
Ignore evaluation tests for floorDiv and mod with FIR for now.
2021-03-05 23:46:57 +03:00

8 lines
179 B
Kotlin
Vendored

// !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)