<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font size="+1"><tt>It is kind of weird, though, when Bar is not
static, since you can't create a Bar without having a Foo in
hand, and you can't create a Foo without a Bar. You could cheat
and do this:<br>
<br>
   Foo f = new Foo(null);<br>
   Bar b = f.new Bar(...);<br>
   Foo ff = new Foo(b);<br>
<br>
but I doubt anyone will find this technique useful for anything
other than a puzzler...<br>
</tt></font><br>
<div class="moz-cite-prefix">On 3/24/2020 4:57 PM, Remi Forax wrote:<br>
</div>
<blockquote type="cite"
cite="mid:594699329.1500670.1585083459947.JavaMail.zimbra@u-pem.fr">
<pre class="moz-quote-pre" wrap="">Hi all,
a record component can use as type a type declared inside the record itself,
in term of scoping it's like if the record component is part of the internal scope of the record.
record Foo(Bar bar) {
class Bar {
}
}
I think it's the right behaviour but i was not able to find any reference to that in the spec.
regards,
Rémi
</pre>
</blockquote>
<br>
</body>
</html>