On Mon, 26 Jan 2026 12:17:22 GMT, Maurizio Cimadamore <[email protected]>
wrote:
>> Maybe the intent is that you don't want to just check the "depth" of the
>> check, but also the "width" -- e.g. if there's few nested record patterns,
>> but each has a huge number of components.
>
> Also, `isBpCovered` seems to be called by routines (like
> `reduceRecordPattern`) that do not seem related to the new logic (which is
> what got me suspicious about the location of the update to begin with). Which
> has (at least in theory) potential for `TooManyChecksException` to trigger in
> places where it's not expected? (but maybe that's handled by the special
> value `-1` which is carefully set after the new logic runs)
A possible suggestion might be to add this check inside
`doExpandMissingPatternDescriptions` -- after the `if (toExpand instanceof
BindingPattern bp) {` ?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27256#discussion_r2727399031