This fixes the mentioned Definitions to point to Identifier nodes.
I've verified that all tests in eslint/eslint are still passing after this change. All new tests added in https://github.com/eslint/eslint/pull/18636 are also passing after this change.
Refs https://github.com/eslint/eslint/pull/18636#pullrequestreview-2150587740
Currently, if catch param is a pattern,
Definition#name
of variables created in the pattern points to the pattern instead of the Identifier nodes.Repro:
This fixes the mentioned Definitions to point to Identifier nodes.
I've verified that all tests in eslint/eslint are still passing after this change. All new tests added in https://github.com/eslint/eslint/pull/18636 are also passing after this change.