This repository has been archived by the owner on Feb 19, 2024. It is now read-only.
Consider reporting the diagnostics on the nodes that represent the type, not the whole typeof
expressions
#46
Labels
Motivation
For diagnostics emitted in attribute argument syntax nodes that are
typeof
expressions, the error lies on the types themselves, not the fact that atypeof
expression was used. Therefore, semantically it would make more sense to only highlight the type that was used instead of the whole expression.Another benefit is that it reduces clutter by having smaller chunks of code being highlighted with red squiggles.
Drawbacks
Smaller type names will be harder to distinguish an error on. The main problem would be those with too short names, of up to about 3 letters which seem to be common enough. In a dense document, along with the syntax that generic type arguments come with, users could have a harder time distinguishing where the error is at without resorting to having the IDE navigate them.
Example
Current:
Proposed:
The text was updated successfully, but these errors were encountered: