Integrated: 8273263: Incorrect recovery attribution of record component type when j.l.Record is unavailable
jlahoda at openjdk.java.net
Fri Sep 3 09:33:33 UTC 2021
On Thu, 2 Sep 2021 10:54:14 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> This is a little obscure case where `j.l.Record` is not available, yet the source code contains a record, the AST model is slightly broken - the first record's component has an erroneous type. The reason is that `syms.recordType` is used directly, and when it is completed (for the first time), the `CompletionFailure` thrown will break the component's type. It would be better to report the error on the proper place at a proper place. This is already done for enums, where the supertype is attributed from an AST, which reports any errors at an appropriate place. The proposal in this patch is to also create a temporary AST for `j.l.Record` and attribute it, so that the errors are reported at an appropriate time and place.
This pull request has now been integrated.
Author: Jan Lahoda <jlahoda at openjdk.org>
Stats: 51 lines in 3 files changed: 49 ins; 0 del; 2 mod
8273263: Incorrect recovery attribution of record component type when j.l.Record is unavailable
More information about the compiler-dev