RFR: 8225488: Examine ExecutableType.getReceiverType behavior when source receiver parameter is absent

Jonathan Gibbons jjg at openjdk.java.net
Mon Aug 9 18:00:38 UTC 2021


On Tue, 3 Aug 2021 00:06:37 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> A belated companion fix to JDK-8222369, this change updates ExecutableType.getReceiverType to have its specified behavior:
> 
>    Returns the return type of this executable. Returns a NoType with kind VOID if this executable is not a method, or is a method that does not return a value.
> 
> rather than returning null, as the implementation did before. The ExecutableElement implementation in Symbol is updated accordingly to take advantage of the change in Type, along with augmenting the test from JDK-8222369 to cover the receiver type from the ExecutableType too.
> 
> BasicAnnoTests.java is updated for revised offsets.
> 
> All langtools tests pass with these changes and TestExecutableReceiverType.java fails with an unmodified javac in JDK 18.
> 
> Please also review the companion CSR JDK-8271703, https://bugs.openjdk.java.net/browse/JDK-8271703

Marked as reviewed by jjg (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/4965


More information about the compiler-dev mailing list