lean4 icon indicating copy to clipboard operation
lean4 copied to clipboard

fix: deprecation span should only cover the ident

Open digama0 opened this issue 2 years ago • 1 comments

Previously, if foo is deprecated then the entire simp [foo] call would be highlighted. This causes issues for a linter I am writing which requires that the warning just cover the identifier, as well as just being generally confusing for the user if there are many identifiers in the simp call.

simp is not the only affected tactic, many functions call resolveId? without setting the ref first. An alternative solution would be to have Linter.checkDeprecated take a syntax directly instead of using the ref, but there are also some other errors that identifier resolution can throw which are subject to the same issue.

digama0 avatar Aug 25 '23 03:08 digama0

LGTM but could you add a brief comment as to what the new test is testing?

Kha avatar Aug 25 '23 09:08 Kha