[lworld] RFR: Make "PrimitiveParameterizedClass.default" a poly expression. [v2]
Srikanth Adayapalam
sadayapalam at openjdk.java.net
Mon Jul 19 08:30:21 UTC 2021
On Sun, 4 Jul 2021 19:18:51 GMT, Jesper Steen Møller <jespersm at openjdk.org> wrote:
>> Make .default a separate node type in the parser.
>>
>> ## Issue
>> [JDK-8211914](https://bugs.openjdk.java.net/browse/JDK-8211914): [lworld] Javac should support type inference for default value creation
>>
>> Note: The Linux x86 builds in GitHub actions seem to fail with something completely unrelated to these changes.
>
> Jesper Steen Møller has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
>
> [lworld] Handling poly-inference of missing arguments by simulating a synthetic method.
A way to see this in more detail is to debug through the Attr.visitApply call corresponding to the method invocation
m(new X<>(), X.default);
in this test case:
public primitive class X<T> {
static void m(X<String> ls, X<String> ls2) { }
public static void main(String [] args) {
m(new X<>(), X.default);
}
}
You will see that first argument is typed to be DeferredType and second one incorrectly to be X<T\>
-------------
PR: https://git.openjdk.java.net/valhalla/pull/369
More information about the valhalla-dev
mailing list