<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Hi,<br>
<br>
I think this is probably more a feature request than a bug but in
any case please file an issue and assign it to myself,<br>
<br>
Thanks,<br>
Vicente<br>
<br>
<div class="moz-cite-prefix">On 8/19/24 12:02, Mickael Istria wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAFr6BZRu5aKr0CghbW7feB6tgSy8p_2Gzee0m8YGYGMYjT9erg@mail.gmail.com">
<div dir="ltr">
<div>Hi all,<br>
</div>
<div><br>
</div>
<div>As part of our work to allow Eclipse JDT to use Javac as
backend, we noticed that in case of unresolved parameterized
types, the compiler doesn't generate a nice recovered
TypeSymbol with interesting data (such as the name) that can
be used later.<br>
</div>
<div>For example, my latest issue is that code like</div>
<div>```</div>
<div>class K {</div>
<div> Regular reg;</div>
<div> Parameterized<Object> par;</div>
<div>}</div>
<div>```</div>
<div>where neither Regular nor Parameterized exist, make Javac
produce a "recovered" symbol for `Regular` (at least the
ErrorTypr stores the "Regular" name) when asking for the tsym
of `reg` VarSymbol, while it doesn't produce anything useful
for `Parameterized` when asking for the tsym of `par`
VarSymbol. In this later case, the symbol points to `noType`
which isn't usable by the IDE to generate a minimal DOM
object.</div>
<div><br>
</div>
<div>In comparison, ECJ generates a recovered type binding for
`Parameterized`, which can be later used by some refactorings
as if the type were existing. Such refactorings that work with
ECJ backend cannot work with the Javac backend because of the
symbol being unusable.</div>
<div><br>
</div>
<div>We're currently adding a bunch of workarounds in many
places to handle this case, but we'd obviously rather prefer
if Javac can come with such smartness out of the box.<br>
</div>
<div><br>
</div>
<div>So this behavior in Javac seems to me like a small issue or
limitation in Javac. What do you think? Is this "problem"
already known? Should this be reported as a bug? Does it make
sense to expect Javac to provide such recovery for
parameterized types to? Should we try to fix it?...</div>
<div><br>
</div>
<div>Thanks in advance for you guidance<br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>Mickael Istria<br>
</div>
<a href="https://www.eclipse.org/eclipseide" target="_blank" moz-do-not-send="true">Eclipse IDE</a>
developer, for <a href="https://developers.redhat.com/" target="_blank" moz-do-not-send="true">Red Hat</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>