KT-2416 fix contains for ranges with primitive parameters

This commit is contained in:
Alex Tkachman
2012-08-03 09:15:53 +03:00
parent 8ba9e9f51b
commit 0e4a8660fd
9 changed files with 79 additions and 17 deletions
@@ -0,0 +1,13 @@
fun main(args: Array<String>) {
9 in 0..9
val intRange = 0..9
9 in intRange
val charRange = '0'..'9'
'9' in charRange
val byteRange = 0.toByte()..9.toByte()
9.toByte() in byteRange
val longRange = 0.toLong()..9.toLong()
9.toLong() in longRange
val shortRange = 0.toShort()..9.toShort()
9.toShort() in shortRange
}