A peek at the roadmap for pattern matching and more
forax at univ-mlv.fr
forax at univ-mlv.fr
Thu Aug 13 13:10:46 UTC 2020
> De: "Brian Goetz" <brian.goetz at oracle.com>
> À: "Remi Forax" <forax at univ-mlv.fr>
> Cc: "amber-spec-experts" <amber-spec-experts at openjdk.java.net>
> Envoyé: Jeudi 13 Août 2020 03:51:51
> Objet: Re: A peek at the roadmap for pattern matching and more
>> In the code:
>> public deconstructor B(int a, int b) {
>> super(var aa) = this;
>> a = aa;
>> b = this.b;
>> }
>> i believe the first line should be
>> A(var aa) = super;
> P = e
> is like
> if (e instanceof P) { rest of method }.
> What would be on the LHS of the instanceof would be `this`, not `super`. This is
> like `if (this instanceof super(var aa))`.
I'm not able to parse "super(var aa)", it's not a pattern we have not talk about.
And "super" is "this" typed as the superclass and with the method calls on it using invokespecial instead of invokevirtual.
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20200813/8a53ea8c/attachment.htm>
More information about the amber-spec-experts
mailing list