RFR: 8338678: Erroneous parameterized type represented as <any>

Vicente Romero vromero at openjdk.org
Mon Aug 26 14:28:35 UTC 2024


On Mon, 26 Aug 2024 14:20:49 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> Consider code like:
> 
> class C {
>     Undefined u1;
>     Undefined<UndefinedParam> u2;
> }
> 
> 
> The types of both `u1` and `u2` are erroneous, but the internal properties of the types are different. For `u1`, the erroneous type keeps the name (`Undefined`), while for `u2`, the type is simply `<any>`.
> 
> The proposal here is to improve the error recovery, and create a parameterized error type for the second case.

looks sensible

-------------

Marked as reviewed by vromero (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20716#pullrequestreview-2260831475


More information about the compiler-dev mailing list