A peek at the roadmap for pattern matching and more

Brian Goetz brian.goetz at oracle.com
Thu Aug 13 13:29:43 UTC 2020


> 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.

It’s a straightforward duality to constructor-super relationships.  

In a _constructor_, you can say super(…) and it will overload select against constructors in the superclass, and chain to that.  

In a _deconstructor_, you can use super(…) as a pattern, and it will overload select against deconstructors in the superclass, and match to that.  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20200813/9d243dcd/attachment.htm>


More information about the amber-spec-experts mailing list