Unfinished leftover work from JDK-8058112.
The following program crashes with
LambdaConversionException: Invalid receiver type interface
public class SortedInterfacesTest {
<T> void forAll(Consumer<T> consumer, T... values) { }
public void secondTest() {
forAll(Picture::draw, new MyPicture(), new Universal());
}
interface Shape { void draw(); }
interface Marker { }
interface Picture { void draw(); }
class MyShape implements Marker, Shape { public void draw() { } }
class MyPicture implements Marker, Picture { public void draw() { } }
class Universal implements Marker, Picture, Shape { public void draw() { } }
public static void main(String[] args) {
new SortedInterfacesTest().secondTest();
}
}