Implement hack to support both remove() and removeAt() in MutableList<Int>

Also add couple of tests about CharSequence.get
This commit is contained in:
Denis Zharkov
2015-10-10 20:49:18 +03:00
parent 742a538aed
commit 89ded4ab1d
10 changed files with 320 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
import java.util.*;
public class J {
private static class MyList extends A {}
public static String foo() {
MyList myList = new MyList();
List<Integer> list = (List<Integer>) myList;
if (!list.remove((Integer) 1)) return "fail 1";
if (list.remove((int) 1) != 123) return "fail 2";
if (!myList.remove((Integer) 1)) return "fail 3";
if (myList.remove((int) 1) != 123) return "fail 4";
if (myList.removeAt(1) != 123) return "fail 5";
return "OK";
}
}