<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hi Olexandr,</p>
<p><br>
</p>
<p>Thanks for the report. I've filled:<br>
<a class="moz-txt-link-freetext" href="https://bugs.openjdk.org/browse/JDK-8338981">https://bugs.openjdk.org/browse/JDK-8338981</a></p>
<p><br>
</p>
<p>Jan</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 26. 08. 24 14:28, Olexandr Rotan
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAL5bRt9OwRct5UFsT+QATX0MPL4FB=Xohowe1a-pJtf09bm56w@mail.gmail.com">
<div dir="ltr">Hello. Recently, I have started a new project to
explore Babylon code reflection API (LInq), and thought that
using sealed classes to represent operand type would be really
suitable (function calls, column refs etc.). However, I want to
only expose one interface/abstract class for each of those
types, while actual implementations are private classes inside
sealed classes. However, when I tried to compile something like
this (simplified for brevity):
<div><br>
</div>
<div>
<pre style="color:rgb(188,190,196);font-family:"JetBrains Mono",monospace"><span style="color:rgb(207,142,109)">sealed class </span>Tmp <span style="color:rgb(207,142,109)">permits </span>Tmp.A {
<span style="color:rgb(207,142,109)">private static final class </span>A <span style="color:rgb(207,142,109)">extends </span>Tmp {
}
}</pre>
<pre style="color:rgb(188,190,196);font-family:"JetBrains Mono",monospace">
</pre>
<pre style=""><span style="background-color:rgb(243,243,243)"><font color="#000000" style="" face="arial, sans-serif">I got following error:</font></span></pre>
<pre style="">error: A has private access in Tmp</pre>
<pre style="">
</pre>
<pre style=""><font face="arial, sans-serif">Is this behaviour expected or not?
(I would assume second since intellij code analysis didn't mark this as error)
If it's later, I would ask some JDK member to file a bug report (I noticed that they
are processed faster then non-member requests), and I will try to fix this. If it`s
premier, then what is the motivation behind this?</font></pre>
<pre style=""><span style="background-color:rgb(243,243,243)">
</span></pre>
</div>
</div>
</blockquote>
</body>
</html>