lean4-htt/tests/lean/run/issue8213.lean
Markus Himmel eda467e066
fix: typo in application type mismatch error message (#8290)
This PR fixes a typo that was introduced recently.
2025-05-12 13:35:29 +00:00

32 lines
1.1 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- set_option trace.Meta.FunInd true
def myTest {α}
(mmotive : (x : List α) → Sort v)
(x : List α)
(h_1 : (a : α) → (dc : List α) → x = a :: dc → mmotive (a :: dc))
(h_2 : (x' : List α) → x = x' → mmotive x') : mmotive x :=
match (generalizing := false) h : x with
| a :: dc => h_1 a dc h
| x' => h_2 x' h
/--
error: Failed to realize constant myTest.fun_cases:
Cannot derive functional cases principle (please report this issue)
failed to transform matcher, type error when constructing new pre-splitter motive:
@myTest.match_1 _fvar.28 (fun x => @_fvar.27 _fvar.28 _fvar.29 x _fvar.31 _fvar.32) _fvar.30
Application type mismatch: In the application
motive mmotive x✝ h_1
the final argument
h_1
has type
(a : α) → (dc : List α) → x = a :: dc → mmotive (a :: dc) : Sort (imax (u_1 + 1) (u_1 + 1) v)
but is expected to have type
(a : α) → (dc : List α) → x✝ = a :: dc → mmotive (a :: dc) : Sort (imax (u_1 + 1) (u_1 + 1) v)
---
error: unknown identifier 'myTest.fun_cases'
-/
#guard_msgs in
def foo := @myTest.fun_cases