Introduce OpenEndRange and make primitive ranges implement it
#KT-52932
This commit is contained in:
@@ -47,6 +47,7 @@ compileKotlinCommon {
|
||||
"-opt-in=kotlin.ExperimentalMultiplatform",
|
||||
"-opt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xallow-kotlin-package",
|
||||
"-XXLanguage:+RangeUntilOperator",
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -57,6 +58,7 @@ compileTestKotlinCommon {
|
||||
"-opt-in=kotlin.RequiresOptIn",
|
||||
"-opt-in=kotlin.ExperimentalUnsignedTypes",
|
||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||
"-XXLanguage:+RangeUntilOperator",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -458,6 +458,8 @@ public operator fun ClosedRange<Double>.contains(value: Float): Boolean {
|
||||
return contains(value.toDouble())
|
||||
}
|
||||
|
||||
// TODO: for OpenEndRange<Double>
|
||||
|
||||
/**
|
||||
* Checks if the specified [value] belongs to this range.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user