doc: elabissue for weird elab error
This commit is contained in:
parent
20caac5cdf
commit
90455e201f
1 changed files with 37 additions and 0 deletions
37
tests/elabissues/let_destruct_inside_forall.lean
Normal file
37
tests/elabissues/let_destruct_inside_forall.lean
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
axiom Foo : Type
|
||||
axiom foo : Foo
|
||||
|
||||
/- This works -/
|
||||
def works : Prop :=
|
||||
-- ∀ (x : Foo),
|
||||
let ⟨foo₁, foo₂⟩ := (foo, foo);
|
||||
false
|
||||
|
||||
/- Uncommenting breaks it -/
|
||||
def fails₁ : Prop :=
|
||||
∀ (x : Foo),
|
||||
let ⟨foo₁, foo₂⟩ := (foo, foo);
|
||||
false
|
||||
-- let_destruct_inside_forall.lean:11:4: error: invalid match/convoy expression, expected type is not known
|
||||
|
||||
/- All the following variations fail as well with the same message -/
|
||||
def fails₂ : Prop :=
|
||||
∀ (x : Foo),
|
||||
let (⟨foo₁, foo₂⟩ : Foo × Foo) := (foo, foo);
|
||||
foo₁ = foo₂
|
||||
|
||||
def fails₃ : Prop :=
|
||||
∀ (x : Foo),
|
||||
let (⟨foo₁, foo₂⟩ : Foo × Foo) := (foo, foo);
|
||||
false
|
||||
|
||||
def fails₄ : Prop :=
|
||||
∀ (x : Foo),
|
||||
let (⟨foo₁, foo₂⟩ : Foo × Foo) := ((foo, foo) : Foo × Foo);
|
||||
false
|
||||
|
||||
def fails₅ : Prop :=
|
||||
∀ (x : Foo),
|
||||
let p : Foo × Foo := (foo, foo);
|
||||
let ⟨foo₁, foo₂⟩ := p;
|
||||
foo₁ = foo₂
|
||||
Loading…
Add table
Reference in a new issue