Files
mercury/tests/invalid/bug436.m
Zoltan Somogyi ffa87fc0d9 Update the programming style of some tests in invalid.
tests/invalid/bug10.{m,err_exp}:
tests/invalid/bug115.{m,err_exp}:
tests/invalid/bug117.{m,err_exp}:
tests/invalid/bug191.{m,err_exp}:
tests/invalid/bug436.{m,err_exp}:
tests/invalid/invalid_binary_literal.{m,err_exp}:
tests/invalid/invalid_decimal_literal.{m,err_exp}:
tests/invalid/invalid_float_literal.{m,err_exp}:
tests/invalid/invalid_hex_literal.{m,err_exp}:
tests/invalid/invalid_octal_literal.{m,err_exp}:
tests/invalid/invalid_pragma.{m,err_exp}:
tests/invalid/require_tailrec_invalid.{m,err_exp}:
tests/invalid/type_lhs_var.{m,err_exp}:
tests/invalid/typeclass_no_param.{m,err_exp}:
tests/invalid/unrecognized_pragma.{m,err_exp}:
    Put vim modelines into these .m files, and improve their
    programming style.

    Update the .err_exp files for the changed line numbers.
2019-07-25 21:42:21 +02:00

35 lines
771 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
%
% Check that all of the symbols in the third argument of a foreign_enum pragma
% are data constructors of the type referred to by the foreign_enum pragma.
%
%---------------------------------------------------------------------------%
:- module bug436.
:- interface.
:- type foo
---> foo1
; foo2.
:- type bar
---> bar1
; bar2.
:- implementation.
:- pragma foreign_enum("C", foo/0, [
foo1 - "1",
foo2 - "2",
bar - "3"
]).
:- pragma foreign_enum("C", bar/0, [
bar1 - "1",
bar2 - "2",
baaz1 - "3",
baaz2 - "4"
]).