This PR fixes an issue where go-to-definition would jump to the wrong location in presence of async theorems. While the elaborator does not explicitly depend on `FVar`s not being reused between declarations, the language server turned out to do so. As we would have to split the name generator in any case as soon as we add any parallelism within proofs, we now do so for any async code in order to uphold this invariant again. --------- Co-authored-by: mhuisi <mhuisi@protonmail.com>
14 lines
506 B
Text
14 lines
506 B
Text
--^ waitForILeans
|
|
|
|
-- Regression test for a bug where (due to parallelism) the fvar ids weren't unique for the whole
|
|
-- module, leading to a conflict between `i` of `lt_next'` and the fvar id for `prev'`, thus
|
|
-- making go to definition jump to the wrong location.
|
|
|
|
theorem lt_next' (s : Substring.Raw) (i : String.Pos.Raw) (h : i.1 < s.bsize) :
|
|
i.1 < (s.next i).1 := by
|
|
sorry
|
|
|
|
def prev' : Substring.Raw → String.Pos.Raw → String.Pos.Raw := sorry
|
|
|
|
#check prev'
|
|
--^ textDocument/definition
|