cache diamond inference results

This commit is contained in:
Anna Kozlova
2015-09-30 10:59:13 +02:00
parent 17f7affff2
commit c111105d30
4 changed files with 109 additions and 69 deletions

View File

@@ -0,0 +1,18 @@
class Test {
static class C<U> {
U u;
C(C<U> other) {
u = other.u;
}
C(U u) {
this.u = u;
}
}
static <U> C<U> foo(C<U> c) { return new C<U>(c); }
{
C<String> c = foo(new C<>(foo(new C<>(foo(new C<>(foo(new C<>(foo(null)))))))));
}
}