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:
Alex Tkachman
2012-08-31 13:48:25 +03:00
parent c027b4149b
commit 737b794935
4 changed files with 36 additions and 12 deletions
@@ -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)
}
}