mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-21 20:33:55 +00:00
compiler/add_foreign_proc.m:
Don't module qualify the named of predicates/functions
defined by foreign_procs when generating an error message
about that foreign_proc, since
- you can add foreign_procs only for local predicates/functions, and
- even if you one for a NON-local predicate/function, the context will
tell you exactly which foreign_proc is being complained about.
Also, improve the wording of the error message.
tests/invalid/instances_pc.instances_pc_helper_1.err_exp2:
tests/invalid/instances_pc.m:
Add a new expected output file for bootchecks in C# and Java grades,
and document the new expected output file.
tests/invalid/pragma_c_code_dup_var.{err_exp2,err_exp3}:
tests/invalid/pragma_c_code_dup_var.{m,err_exp}:
Add two new expected output files for bootchecks in C# and Java grades.
Note the role of each expected output file, and apply the resulting
line number changes to the expected output file for C.
tests/invalid_make_int/instance_no_type.{m,int_err_exp}:
Move this test case from tests/invalid to tests/invalid_make_int,
since the compiler now diagnoses the bug it tests for
during the creation of the .int file.
tests/invalid_make_int/pragma_export_int.{m,err_exp}:
Move half of the pragma_export test case here from tests/invalid,
since the compiler now diagnoses the bug it tests for
during the creation of the .int file.
tests/invalid_nodepend/pragma_export.{m,err_exp}:
Move the other half of the pragma_export test case here from tests/invalid.
With mmc --make, the diagnosable-at-.int-file-creation-time errors
prevent the compiler from ever getting to the errors that are not
diagnosable at that time, so delete the code that gives rise to those
diagnosable-at-that-time errors from this version of the test case..
tests/invalid/Mmakefile:
Delete the tests moved to other test directories.
tests/invalid_make_int/Mercury.options:
tests/invalid_make_int/Mmakefile:
tests/invalid_nodepend/Mmakefile:
Add the tests moved to these directories from tests/invalid.
27 lines
875 B
Mathematica
27 lines
875 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% rotd-2009-04-03 and before failed to detect the overlapping instance
|
|
% between this parent module and its child module unless the option
|
|
% --intermodule-optimization was enabled, despite the fact that the
|
|
% information needed for doing that check is contained in the parent module's
|
|
% private interface (.int0) file.
|
|
%
|
|
% The .err_exp file is for C, the .err_exp2 file is for Java and C#.
|
|
%
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- module instances_pc.
|
|
:- interface.
|
|
|
|
:- typeclass foo(A, B) <= (A -> B) where [].
|
|
|
|
:- instance foo(int, float).
|
|
|
|
:- include_module instances_pc_helper_1.
|
|
|
|
:- implementation.
|
|
|
|
:- instance foo(int, float) where [].
|