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

Jan Lahoda jlahoda at openjdk.org
Mon Aug 26 14:28:35 UTC 2024


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.

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

Commit messages:
 - 8338678: Erroneous parameterized type represented as <any>

Changes: https://git.openjdk.org/jdk/pull/20716/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20716&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8338678
  Stats: 104 lines in 3 files changed: 98 ins; 4 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/20716.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20716/head:pull/20716

PR: https://git.openjdk.org/jdk/pull/20716


More information about the compiler-dev mailing list