RFR: JDK-8300857: State return value for Types.asElement(NoType) explicitly
Joe Darcy
darcy at openjdk.org
Wed Jan 25 03:59:04 UTC 2023
On Tue, 24 Jan 2023 05:38:36 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> Just sending out the proposed API changes for now, will add tests later.
>
> Please also review the corresponding CSR [JDK-8300951](https://bugs.openjdk.org/browse/JDK-8300951).
Quick discussion of the revised version of the patch:
* After looking at the javac implementation, I added spec and implementation support for the type mirrors of packages and modules returning the element for the package or module. This was a very small addendum to add support and allows round-tripping in more cases.
* Neither union types nor intersection types are in the explicitly mapped or explicitly not mapped lists. This types are generally returned from trees and elements modeling the inside of method bodies rather than the declaration-level structures in the standardized API.
The remaining explicitly listed types-without-elements are straightforward to generate via the standard APIs.
-------------
PR: https://git.openjdk.org/jdk/pull/12159
More information about the compiler-dev
mailing list