JVM: KT-40665 more exact check for intrinsified range 'contains'
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
operator fun ClosedRange<Int>.contains(value: Long) = false
|
||||
operator fun ClosedRange<UInt>.contains(value: ULong) = false
|
||||
|
||||
fun box(): String {
|
||||
if (10L in 1..10) return "Failed: Long in Int..Int"
|
||||
if (10UL in 1U..10U) return "Failed: ULong in UInt..UInt"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user