chore: use withAssignableSyntheticOpaque
This commit is contained in:
parent
608a306ef0
commit
ec4794ad10
2 changed files with 2 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ def elabTermEnsuringType (stx : Syntax) (expectedType? : Option Expr) (mayPostpo
|
|||
let eType ← inferType e
|
||||
-- We allow synthetic opaque metavars to be assigned in the following step since the `isDefEq` is not really
|
||||
-- part of the elaboration, but part of the tactic. See issue #492
|
||||
unless (← withAssignableSyntheticOpaque do isDefEq eType expectedType) do
|
||||
unless (← withAssignableSyntheticOpaque <| isDefEq eType expectedType) do
|
||||
Term.throwTypeMismatchError none expectedType eType e
|
||||
return e
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ partial def mkElimApp (elimInfo : ElimInfo) (targets : Array Expr) (tag : Name)
|
|||
throwError "insufficient number of targets for '{elimInfo.name}'"
|
||||
let target := ctx.targets[s.targetPos]!
|
||||
let expectedType ← getArgExpectedType
|
||||
let target ← withConfig (fun cfg => { cfg with assignSyntheticOpaque := true }) do Term.ensureHasType expectedType target
|
||||
let target ← withAssignableSyntheticOpaque <| Term.ensureHasType expectedType target
|
||||
modify fun s => { s with targetPos := s.targetPos + 1 }
|
||||
addNewArg target
|
||||
else match c.binderInfo with
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue