Interesting switch pattern-matching snippets that don't compile but maybe should

Robbe Pincket robbepincket at live.be
Sun Jan 22 16:16:34 UTC 2023


Sun Jan 22 01:03:59 UTC 2023, David Alayachew:

> Am I missing something? Your first example does not compile.

My bad, I changed something about the examples during the riting of
the email and seemed to have copied something incorrectly.
The line defining `Other` should be extending `Base` and not `Uber`:

`record Other<T>() implements Base<T>{}`

The other errors seemed to be a result of this error.

Kind regards
Robbe Pincket
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230122/168f2aed/attachment.htm>


More information about the amber-dev mailing list