mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
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
21 lines
653 B
Java
21 lines
653 B
Java
import java.lang.*;
|
|
import java.util.*;
|
|
|
|
public class Test {
|
|
public static class IterableImpl implements Iterable<String> {
|
|
public Iterator<String> iterator() { return new IteratorImpl(); }
|
|
}
|
|
|
|
public static class IteratorImpl implements Iterator<String> {
|
|
public boolean hasNext() { return false; }
|
|
public String next() { return null; }
|
|
public void remove() { }
|
|
}
|
|
|
|
public static class MapEntryImpl implements Map.Entry<String, String> {
|
|
public String getKey() { return null; }
|
|
public String getValue() { return null; }
|
|
public String setValue(String s) { return null; }
|
|
}
|
|
}
|