fix: fixes #1707
This commit is contained in:
parent
7874c03c27
commit
56002e1b33
3 changed files with 4 additions and 1 deletions
|
|
@ -1272,7 +1272,7 @@ private partial def elabAppFn (f : Syntax) (lvals : List LVal) (namedArgs : Arra
|
|||
LVal.fieldName comp (toString comp.getId) none e
|
||||
elabAppFn e (newLVals ++ lvals) namedArgs args expectedType? explicit ellipsis overloaded acc
|
||||
let elabFieldIdx (e idxStx : Syntax) := do
|
||||
let idx := idxStx.isFieldIdx?.get!
|
||||
let some idx := idxStx.isFieldIdx? | throwError "invalid field index"
|
||||
elabAppFn e (LVal.fieldIdx idxStx idx :: lvals) namedArgs args expectedType? explicit ellipsis overloaded acc
|
||||
match f with
|
||||
| `($(e).$idx:fieldIdx) => elabFieldIdx e idx
|
||||
|
|
|
|||
1
tests/lean/1707.lean
Normal file
1
tests/lean/1707.lean
Normal file
|
|
@ -0,0 +1 @@
|
|||
def y := c.5ÿ
|
||||
2
tests/lean/1707.lean.expected.out
Normal file
2
tests/lean/1707.lean.expected.out
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
1707.lean:1:9-1:12: error: invalid field index
|
||||
1707.lean:1:12: error: expected command
|
||||
Loading…
Add table
Reference in a new issue