Idris2
Idris2 copied to clipboard
Incorrect span error with mismatched comment block containing a nested comment block
Steps to Reproduce
public export
Hmmm : Nat
{-
-}-}
Expected Behavior
Report a parse error on the final -}
on the final line.
-- line 3 col 0:
Couldn't parse declaration.
:3:1--3:2
1 | public export
2 | Hmmm : Nat
3 | -}
^
Observed Behavior
Report a parse error on the public
on the first line.
line 1 col 0:
Keyword 'public' is not a valid start to a declaration.
:1:1--1:7
1 | public export
^^^^^^
Removing the properly nested, inner comment makes idris report the correct place.