new inference: teach strict subtyping constraint about intersection types (IDEA-129727)

This commit is contained in:
Anna Kozlova
2014-09-11 09:48:40 +04:00
parent e2714de6ad
commit 16838a8c11
3 changed files with 35 additions and 2 deletions

View File

@@ -0,0 +1,15 @@
import java.io.Serializable;
import java.util.function.Supplier;
class Test {
static class Loader<K> {
static <K> Loader<K> from(Supplier<K> supplier) {
return new Loader<>();
}
}
Loader loader = Loader.from((I<String> & Serializable) () -> "");
interface I<H> extends Supplier<H>{}
}