MethodSymbol.implementedIn
Liam Miller-Cushon
cushon at google.com
Thu Apr 21 16:25:41 UTC 2016
Oh, good question. There was a single usage in TransTypes that was recently
deleted: http://hg.openjdk.java.net/jdk9/dev/langtools/rev/2a83d2947323
So can the method be removed?
On Thu, Apr 21, 2016 at 9:19 AM, Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:
> Is the method even used? My IDE says it's only used recursively within the
> same method...
>
> Maurizio
>
>
> On 21/04/16 16:57, Liam Miller-Cushon wrote:
>
>> Hi, I have a question about MethodSymbol.implementedIn:
>>
>> http://hg.openjdk.java.net/jdk9/dev/langtools/file/9b37d0f28609/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java#l1620
>>
>> I think the FIXME about using subst() is incorrect, Types.memberType
>> takes care of that.
>>
>> But testing that the return types are the same still looks wrong, because
>> it doesn't handle implementations with covariant return types.
>>
>> I'm not sure why implementedIn is testing return types at all: it calls
>> MethodSymbol.overrides, which checks return types.
>>
>> So perhaps the call to isSameType in implementedIn can just be removed?
>> Deleting it doesn't break any tests.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20160421/d173b518/attachment.html>
More information about the compiler-dev
mailing list