Fix tests for in/in! with primitive range literals
- ClosedFloatingPointRange<T> - IntRange, etc - extensions in kotlin.ranges for ranges of Byte/Int/Short
This commit is contained in:
@@ -1,28 +1,20 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun Byte.in2(left: Byte, right: Byte): Boolean {
|
||||
return this in left..right
|
||||
}
|
||||
fun Byte.inByte(left: Byte, right: Byte) = this in left..right
|
||||
|
||||
fun inInt(x: Int, left: Int, right: Int): Boolean {
|
||||
return x in left..right
|
||||
}
|
||||
fun Short.inInt(left: Int, right: Int) = this in left .. right
|
||||
|
||||
fun inDouble(x: Double, left: Double, right: Double): Boolean {
|
||||
return x in left..right
|
||||
}
|
||||
fun Short.inByte(left: Byte, right: Byte) = this in left..right
|
||||
|
||||
fun inFloat(x: Float, left: Float, right: Float): Boolean {
|
||||
return x in left..right
|
||||
}
|
||||
fun inInt(x: Int, left: Int, right: Int) = x in left..right
|
||||
|
||||
fun inLong(x: Long, left: Long, right: Long): Boolean {
|
||||
return x in left..right
|
||||
}
|
||||
fun inDouble(x: Double, left: Double, right: Double) = x in left..right
|
||||
|
||||
fun inCharWithNullableParameter(x: Char?, left: Char, right: Char): Boolean {
|
||||
return x!! in left..right
|
||||
}
|
||||
fun inFloat(x: Float, left: Float, right: Float) = x in left..right
|
||||
|
||||
fun inLong(x: Long, left: Long, right: Long) = x in left..right
|
||||
|
||||
fun inCharWithNullableParameter(x: Char?, left: Char, right: Char) = x!! in left..right
|
||||
|
||||
// 0 INVOKESPECIAL
|
||||
// 0 NEW
|
||||
|
||||
Reference in New Issue
Block a user