diff options
| author | Emilio Jesus Gallego Arias | 2020-06-01 16:36:44 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2020-06-01 16:36:44 +0200 |
| commit | 558e20c25d2e030d4ba4a0b42458969564815223 (patch) | |
| tree | 233d672aa44ea749f96cea01c414c736d6db403a /test-suite | |
| parent | 4270ed35f2a26f226b01f2293f61d18773e6260b (diff) | |
| parent | dec5edf7c92950881693afe2040d711155cf15b5 (diff) | |
Merge PR #12422: Fixes #12418: an assert false in inference of return clause
Reviewed-by: gares
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/bugs/closed/bug_12418.v | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/bug_12418.v b/test-suite/bugs/closed/bug_12418.v new file mode 100644 index 0000000000..cf11ea627b --- /dev/null +++ b/test-suite/bugs/closed/bug_12418.v @@ -0,0 +1,29 @@ +(* The second "match" below used to raise an anomaly *) + +Class Monad@{d c} (m : Type@{d} -> Type@{c}) : Type := + { ret : forall {t : Type@{d}}, t -> m t }. + +Record state {S : Type} (t : Type) : Type := mkState { runState : t }. + +Global Declare Instance Monad_state : forall S, Monad (@state S). + +Class Cava := { + constant : bool -> unit; + constant_vec : unit; +}. + +Axiom F : forall {A : Type}, (bool -> A) -> Datatypes.unit. + +Fail Instance T : Cava := { + + constant b := match b with + | true => ret tt + | false => ret tt + end; + + constant_vec := @F _ (fun b => match b with + | true => tt + | false => tt + end); + +}. |
