Commit 0a13a964 authored by Marc Durdin's avatar Marc Durdin
Browse files

fix(developer): suppress repeated warnings about unreachable code

Fixes #7216.

The warning message 0x209A 'The rule will never be matched because its
key code is never fired.' was being generated multiple times for a
single line because the `JavaScript_Key` function it is generated by is
used for various purposes.

This PR keeps a cache of reported key rules to ensure that the message
is reported only once for a given key rule, and also improves the
reporting to clarify which specific key is unreachable, which makes it
easier to diagnose when using `any(k)` style messages, for example:

```
lao_phonetic.kmn (237): Warning: 209A The rule will never be matched for key 'ñ' because its key code is never fired.
```

This also reduces the warning to a hint, as this should not be a
blocking issue for a keyboard, rather just a place the keyboard author
can tidy up.
parent 4d62165f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment