fix for KT-2711 wrong check on descriptor being integral range
method added to JetStandardLibrary to get all integral range descriptors #KT-2711 fixed
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class IntRange {
|
||||
fun contains(a: Int) = (1..2).contains(a)
|
||||
}
|
||||
|
||||
class C() {
|
||||
fun rangeTo(i: Int) = IntRange()
|
||||
}
|
||||
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
if (2 in C()..2) {
|
||||
System.out?.println(2)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user