Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecated produces its message on simp #4452

Closed
3 tasks done
adomani opened this issue Jun 14, 2024 · 0 comments · Fixed by #4484
Closed
3 tasks done

deprecated produces its message on simp #4452

adomani opened this issue Jun 14, 2024 · 0 comments · Fixed by #4484
Labels
bug Something isn't working

Comments

@adomani
Copy link
Contributor

adomani commented Jun 14, 2024

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

If a theorem is deprecated and used in simp or dsimp, the deprecation warning is attached to simp, rather than to the declaration itself.

Note: the warning message is correct, it is simply logged at the incorrect syntax node.

Context

This arose in the context of automatic replacement of deprecated declarations. See also this Zulip thread.

Steps to Reproduce

@[deprecated]
theorem hi : True := .intro

example : True := by
  -- the warning is on `simp`
  simp [
    hi  -- could the warning be logged at the syntax node of `hi`?
  ]

Expected behavior: The warning is on hi, not on simp

Actual behavior: The warning is on simp, not on hi.

Versions

#eval Lean.versionString: "4.9.0-rc1"
OS version: live.lean-lang.org, Linux

Additional Information

#4448 is already a PR to fix this issue.

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant