fix for KT-299
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
class MyRange1() : Range<Int> {
|
||||
override fun contains(item: Int) = true
|
||||
}
|
||||
|
||||
class MyRange2() {
|
||||
fun contains(item: Int) = true
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (1 in MyRange1()) {
|
||||
if (1 in MyRange2()) {
|
||||
return "OK"
|
||||
}
|
||||
return "fail 2"
|
||||
}
|
||||
return "fail 1"
|
||||
}
|
||||
@@ -177,4 +177,8 @@ public class ControlStructuresTest extends CodegenTestCase {
|
||||
assertEquals(true, main.invoke(null, null, "lala"));
|
||||
assertEquals(false, main.invoke(null, "papa", "papa"));
|
||||
}
|
||||
|
||||
public void testKt299() throws Exception {
|
||||
blackBoxFile("regressions/kt299.jet");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user