Fix Math.min with coerceAtMost intention inside qualified expression

So #KT-19232 Fixed
This commit is contained in:
Toshiaki Kameyama
2017-07-26 23:40:18 +09:00
committed by Mikhail Glukhikh
parent a82f66cf45
commit 5290553184
12 changed files with 94 additions and 7 deletions
@@ -0,0 +1,7 @@
// WITH_RUNTIME
import java.lang.Math.max
fun foo() {
Pair(<caret>max(1, 3), max(2, 4)).let { println(it) }
}
@@ -0,0 +1,7 @@
// WITH_RUNTIME
import java.lang.Math.max
fun foo() {
Pair(<caret>1.coerceAtLeast(3), max(2, 4)).let { println(it) }
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
Pair(Math.max(1, 3)<caret>, Math.max(2, 4)).let { println(it) }
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
Pair(1.coerceAtLeast(3)<caret>, Math.max(2, 4)).let { println(it) }
}
@@ -0,0 +1,6 @@
// WITH_RUNTIME
import java.lang.Math.max
fun foo() {
Math.max(max(1, 3)<caret>, max(2, 4))
}
@@ -0,0 +1,6 @@
// WITH_RUNTIME
import java.lang.Math.max
fun foo() {
Math.max(1.coerceAtLeast(3), max(2, 4))
}
@@ -0,0 +1,7 @@
// WITH_RUNTIME
import java.lang.Math.min
fun foo() {
Pair(<caret>min(1, 3), min(2, 4)).let { println(it) }
}
@@ -0,0 +1,7 @@
// WITH_RUNTIME
import java.lang.Math.min
fun foo() {
Pair(<caret>1.coerceAtMost(3), min(2, 4)).let { println(it) }
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
Pair(Math.min(1, 3)<caret>, Math.min(2, 4)).let { println(it) }
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun foo() {
Pair(1.coerceAtMost(3)<caret>, Math.min(2, 4)).let { println(it) }
}