RFR: 8319196: ExecutableElement.getReceiverType doesn't return receiver types for methods loaded from bytecode [v4]
Liam Miller-Cushon
cushon at openjdk.org
Sat Nov 4 00:02:21 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
- Add a test for annotated receiver types
- Merge branch 'master' into JDK-8319196
- Update src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java
Co-authored-by: liach <7806504+liach at users.noreply.github.com>
- Add a null check, update affected tests
- 8319196: ExecutableElement.getReceiverType doesn't return receiver types for methods loaded from bytecode
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16482/files
- new: https://git.openjdk.org/jdk/pull/16482/files/4c230bfd..d34ff8ab
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16482&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16482&range=02-03
Stats: 27230 lines in 606 files changed: 14207 ins; 5274 del; 7749 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