RFR: 8261205: AssertionError: Cannot add metadata to an intersection type
Vicente Romero
vromero at openjdk.java.net
Tue May 18 15:32:38 UTC 2021
On Tue, 18 May 2021 14:55:59 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> What happens if we just use declaredUsingVar everywhere? Shouldn't that be the "right" way to do it?
yep I also considered that but then realized that parameters of implicit lambdas also have its vartype set to null until the compiler infers a type for them, so the implicitly-typed set and the declared using `var` set have an intersection but are not the same, I preferred to keep the previous API for the different clients, just with a tweak in the method name, and add a new method to reflect the fact that there is a difference between being explicitly typed and being declared using `var`
-------------
PR: https://git.openjdk.java.net/jdk/pull/4095
More information about the compiler-dev
mailing list