mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-18 07:15:19 +00:00
Estimated hours taken: 0.5
Branches: main
compiler/det_report.m:
Fix a problem with the formatting of some error messages.
tests/invalid/det_errors.{m,exp}:
Add to this test case a test for the new fix.
27 lines
407 B
Mathematica
27 lines
407 B
Mathematica
:- module det_errors.
|
|
|
|
:- interface.
|
|
|
|
:- pred p1(int::in) is det.
|
|
:- pred p2(int::in) is det.
|
|
:- pred p3(int::in) is det.
|
|
:- pred p4(int::in) is det.
|
|
:- pred p5(int::in) is det.
|
|
|
|
:- type t ---> a ; b ; c ; d ; e ; f ; g.
|
|
|
|
:- pred q(t::in, int::out) is det.
|
|
|
|
:- implementation.
|
|
:- import_module int.
|
|
|
|
p1(42).
|
|
p2(X) :- X = 42.
|
|
p3(X) :- X = 42.
|
|
p4(X) :- X = 21 + 21.
|
|
p5(_) :- true.
|
|
|
|
q(a, 1).
|
|
q(b, 2).
|
|
q(c, 3).
|