<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>The fix looks good - but I suggest a refactoring of the condition
which, as is, is quite difficult to parse (for the human eyes).</p>
<p>Maybe factor away:</p>
<pre><span class="new">Name restrictedTypeName = restrictedTypeName(result, !allowVar)</span></pre>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">?</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Maurizio</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 28/06/2019 13:33, Jan Lahoda wrote:<br>
</div>
<blockquote type="cite"
cite="mid:8272c0f6-2a79-1b74-6ffc-35f9af814a8c@oracle.com">Hi,
<br>
<br>
For code like:
<br>
I i = (yield a) -> {};
<br>
<br>
interface I { public void test(String a); }
<br>
<br>
javac will compile the code, as if the "yield" was "var". This is
because of a mistake in restricted types handling in this case.
<br>
<br>
Proposed fix is to ensure we are seeing "var" as the lambda
parameter type, not yield.
<br>
<br>
Webrev: <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~jlahoda/8226522/webrev.00/">http://cr.openjdk.java.net/~jlahoda/8226522/webrev.00/</a>
<br>
JBS: <a class="moz-txt-link-freetext" href="https://bugs.openjdk.java.net/browse/JDK-8226522">https://bugs.openjdk.java.net/browse/JDK-8226522</a>
<br>
<br>
How does this look?
<br>
<br>
Thanks,
<br>
   Jan
<br>
</blockquote>
</body>
</html>