fix: bug at compatibleTypes
Many thanks to @hargoniX
This commit is contained in:
parent
8f2ab82408
commit
e8246e026d
2 changed files with 8 additions and 3 deletions
|
|
@ -201,9 +201,11 @@ partial def compatibleTypes (a b : Expr) : Bool :=
|
|||
if a.isAnyType || b.isAnyType then
|
||||
true
|
||||
else
|
||||
let a := a.headBeta
|
||||
let b := b.headBeta
|
||||
if a == b then
|
||||
let a' := a.headBeta
|
||||
let b' := b.headBeta
|
||||
if a != a' || b != b' then
|
||||
compatibleTypes a' b'
|
||||
else if a == b then
|
||||
true
|
||||
else
|
||||
match a, b with
|
||||
|
|
|
|||
3
tests/lean/run/compatibleTypesBugAtLCNF.lean
Normal file
3
tests/lean/run/compatibleTypesBugAtLCNF.lean
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import Lean
|
||||
|
||||
#eval Lean.Compiler.compile #[``Lean.Compiler.LCNF.Simp.etaPolyApp?]
|
||||
Loading…
Add table
Reference in a new issue