fix: new type ascription elaborator
It was propating the incorrect type.
This commit is contained in:
parent
2e250e6f04
commit
e8531ef4de
1 changed files with 2 additions and 2 deletions
|
|
@ -230,7 +230,7 @@ where
|
|||
match ← expandCDot? e with
|
||||
| some e => `(($e : $type))
|
||||
| none => Macro.throwUnsupported
|
||||
| `(($e)) => do return (← expandCDot? e).getD e
|
||||
| `(($e)) => return (← expandCDot? e).getD e
|
||||
| `(($e, $es,*)) => do
|
||||
let pairs ← mkPairs (#[e] ++ es)
|
||||
(← expandCDot? pairs).getD pairs
|
||||
|
|
@ -240,7 +240,7 @@ where
|
|||
match stx with
|
||||
| `(($e : $type)) =>
|
||||
let type ← withSynthesize (mayPostpone := true) <| elabType type
|
||||
let e ← elabTerm e expectedType?
|
||||
let e ← elabTerm e type
|
||||
ensureHasType type e
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue