RFR: 8225488: Examine ExecutableType.getReceiverType behavior when source receiver parameter is absent
Joe Darcy
darcy at openjdk.java.net
Tue Aug 3 00:48:47 UTC 2021
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
-------------
Commit messages:
- Appease jcheck.
- 8225488: Examine ExecutableType.getReceiverType behavior when source receiver parameter is absent
Changes: https://git.openjdk.java.net/jdk/pull/4965/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4965&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8225488
Stats: 32 lines in 4 files changed: 18 ins; 1 del; 13 mod
Patch: https://git.openjdk.java.net/jdk/pull/4965.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4965/head:pull/4965
PR: https://git.openjdk.java.net/jdk/pull/4965
More information about the compiler-dev
mailing list