You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code produces incorrect highlighting in VS Code in recent (post-#3968) Lean releases:
@[deprecated Array.get? "Use a[i]? or a.get? i instead"]defArray.atIndex? (a : Array α) (i : Nat) : Option α :=
a.get? i
The web editor at live.lean-lang.org seems to be unaffected by this issue.
An interesting variant of this is
@[deprecated Array.get? "Use `a[i]?` or `a.get? i` instead", inherit_doc Array.get?]
where the highlighting is only broken until the end of the attribute.
Steps to Reproduce
Create a new Lean project on a recent nightly and paste in the above code
Expected behavior: Highlighting should work as usual
Actual behavior: Highlighting gets confused by the ] character in the deprecation message.
Versions
4.11.0-nightly-2024-08-05
Linux markus-z16 6.9.12-200.fc40.x86_64 leanprover/lean4#1 SMP PREEMPT_DYNAMIC Sat Jul 27 15:56:15 UTC 2024 x86_64 GNU/Linux
vscode-lean4 v.0.0.176 in VS Code 1.92.0
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
The following code produces incorrect highlighting in VS Code in recent (post-#3968) Lean releases:
The web editor at live.lean-lang.org seems to be unaffected by this issue.
An interesting variant of this is
@[deprecated Array.get? "Use `a[i]?` or `a.get? i` instead", inherit_doc Array.get?]
where the highlighting is only broken until the end of the attribute.
Steps to Reproduce
Expected behavior: Highlighting should work as usual
Actual behavior: Highlighting gets confused by the
]
character in the deprecation message.Versions
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: