Rewrite mutable collection stub method generation

The main problem of the previous approach was that we were only generating
erased method signatures, which was incorrect in case a class also had a member
from another supertype with the same signature as the substituted one from the
collection. Javac issues compilation errors when compiling Java code against
such classes.

Also all the needed method stub signatures were hardcoded in
generateBuiltInMethodStubs() and the case of MutableListIterator was missing
This commit is contained in:
Alexander Udalov
2014-10-22 16:48:30 +04:00
parent 1fc9c58b24
commit 35e956609a
25 changed files with 795 additions and 112 deletions

View File

@@ -0,0 +1,12 @@
class Test {
interface A {
boolean add(String s);
}
static class D extends C {}
void test() {
A a = new D();
a.add("lol");
}
}