RFR: 8319196: ExecutableElement.getReceiverType doesn't return receiver types for methods loaded from bytecode [v2]
Liam Miller-Cushon
cushon at openjdk.org
Thu Nov 2 19:36:19 UTC 2023
> Hello,
>
> Please consider this fix for [JDK-8319196: ExecutableElement.getReceiverType doesn't return receiver types for methods loaded from bytecode](https://bugs.openjdk.org/browse/JDK-8319196).
>
> As discussed in [the accompanying CSR](https://bugs.openjdk.org/browse/JDK-8319330), `ExecutableElement.getReceiverType()` and `ExecutableType.getReceiverType()` currently returns `NoType` unless the receiver parameter syntax was present in source, which also means that `getReceiverType()` doesn't work for methods loaded from class files.
>
> This fix updates the implementation to return the implicit receiver type of methods that do not explicitly declare a receiver parameter in source, including for methods that were loaded from class files.
Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
Add a null check, update affected tests
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16482/files
- new: https://git.openjdk.org/jdk/pull/16482/files/20d192dd..0813717e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16482&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16482&range=00-01
Stats: 19 lines in 3 files changed: 5 ins; 0 del; 14 mod
Patch: https://git.openjdk.org/jdk/pull/16482.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16482/head:pull/16482
PR: https://git.openjdk.org/jdk/pull/16482
More information about the compiler-dev
mailing list