mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-18 07:15:19 +00:00
Estimated hours taken: 0.1 Test case for the more verbose constructor misuse warnings. tests/invalid/constructor_warning.m A simple test case with some constructors used with the wrong arities. tests/invalid/constructor_warning.err_exp The expected results.
18 lines
233 B
Mathematica
18 lines
233 B
Mathematica
:- module constructor_warning.
|
|
|
|
:- interface.
|
|
|
|
:- type foo.
|
|
|
|
:- pred bar(foo::in) is semidet.
|
|
|
|
:- implementation.
|
|
|
|
:- type foo ---> foo_baz(int)
|
|
; foo_baz(int, int)
|
|
; fanta_fanta_fanta.
|
|
|
|
|
|
bar(foo_baz).
|
|
bar(fanta_fanta_fanta(1)).
|