<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<font size="4" face="monospace">That's probably a (well
intentioned!) ECJ bug!<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 8/30/2024 3:52 PM, Stephan Herrmann
wrote:<br>
</div>
<blockquote type="cite" cite="mid:0bb2d4bd-d5e0-4d82-a630-36e41a4db4ea@berlin.de">Thanks
for clarifying.
<br>
<br>
FWIW ecj informs me:
<br>
<br>
The type parameter T should not be bounded by the final type
Integer. Final types cannot be further extended
<br>
<br>
:)
<br>
<br>
Am 30.08.24 um 21:47 schrieb Brian Goetz:
<br>
<blockquote type="cite">I had exactly the same confusion when I
read those words. Alex set me straight.
<br>
<br>
<T extends Integer> int asInt(T t) { return t; }
<br>
<br>
Here, we go from T to Integer (a widening reference conversion),
then to int (an unboxing conversion).
<br>
<br>
On 8/30/2024 3:44 PM, Stephan Herrmann wrote:
<br>
<blockquote type="cite">The other day I stumbled upon this in
the JLS changes for the first preview (JEP 455):
<br>
<br>
* a widening reference conversion followed by an unboxing
conversion
<br>
* a widening reference conversion followed by an unboxing
conversion, then followed by a widening primitive conversion
<br>
<br>
I fail to imagine any type that can be widened to a boxing
type. What's going on here?
<br>
<br>
best,
<br>
Stephan
<br>
<br>
<br>
Am 30.08.24 um 15:55 schrieb Angelos Bimpoudis:
<br>
<blockquote type="cite">Dear experts,
<br>
<br>
A draft JEP for the second preview of primitive types in
patterns, instanceof, and switch is now available. We
propose to preview it for a second time with no changes
relative to JDK 23. This feature aligns what instanceof and
pattern matching mean across all types. This second preview,
unchanged, gives ample time to amber experts to express
their feedback.
<br>
<br>
<a class="moz-txt-link-freetext" href="https://bugs.openjdk.org/browse/JDK-8335876">https://bugs.openjdk.org/browse/JDK-8335876</a>
<br>
<br>
Let us know of your feedback.
<br>
<br>
Thank you,
<br>
Angelos
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>