KT-300 Overload ambiguity while accessing range

This commit is contained in:
Andrey Breslav
2011-09-12 21:32:56 +04:00
parent bd60d8ef1f
commit 4c5d74ea93
5 changed files with 90 additions and 45 deletions
@@ -0,0 +1,9 @@
// KT-300 Overload ambiguity while accessing range
class MyRange() : Range<Int> {
~in~override fun contains(item: Int) = true
}
fun foo(x: Int?, range: MyRange) {
x `in`in range // Int? found, but Int expected
}