mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 19:03:45 +00:00
Estimated hours taken: 0.1 tests/valid/fail_ite.m Regression test for if-then-elses with conditions that cannot succeed.
32 lines
372 B
Mathematica
32 lines
372 B
Mathematica
:- module fail_ite.
|
|
:- interface.
|
|
:- import_module io.
|
|
:- pred p(io__state::di, io__state::uo) is erroneous.
|
|
:- implementation.
|
|
:- import_module require.
|
|
p -->
|
|
( { \+ fail_pred } ->
|
|
[]
|
|
;
|
|
[]
|
|
),
|
|
( { \+ det_pred } ->
|
|
[]
|
|
;
|
|
[]
|
|
),
|
|
( { error("blah") } ->
|
|
[]
|
|
;
|
|
[]
|
|
).
|
|
|
|
|
|
:- pred det_pred is det.
|
|
|
|
det_pred.
|
|
|
|
:- pred fail_pred is failure.
|
|
|
|
fail_pred :- fail.
|