mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-09 21:01:12 +03:00
[parser] error message if use let-in in do block
This commit is contained in:
parent
26c5c4db03
commit
a01b7e25d9
@ -922,8 +922,11 @@ mutual
|
||||
<|> do decoratedKeyword fname "let"
|
||||
commit
|
||||
res <- nonEmptyBlock (letBlock fname)
|
||||
atEnd indents
|
||||
pure (mkDoLets fname res)
|
||||
do b <- bounds (decoratedKeyword fname "in")
|
||||
fatalLoc {c = True} b.bounds "Let-in not supported in do block. Did you mean (let ... in ...)?"
|
||||
<|>
|
||||
do atEnd indents
|
||||
pure (mkDoLets fname res)
|
||||
<|> do b <- bounds (decoratedKeyword fname "rewrite" *> expr pdef fname indents)
|
||||
atEnd indents
|
||||
pure [DoRewrite (boundToFC fname b) b.val]
|
||||
|
Loading…
Reference in New Issue
Block a user