mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-23 21:33:49 +00:00
Estimated hours taken: 2 Branches: main Fix a bug in inter-module optimization with sub-modules reported by Michael Day <mikeday@bigpond.net.au>. The symptom was a compiler abort due to an attempt to take the address of a predicate with multiple modes. The predicate only had multiple mode declarations because the declarations were read from both the `.int0' and `.opt' files for the module. compiler/post_typecheck.m: compiler/purity.m: Remove duplicate modes and report other errors in type declarations for all predicates in a separate pass before purity checking and overloading resolution. tests/valid/Mmakefile: tests/valid/intermod_nested_module_bug.m: tests/valid/intermod_nested_module_bug2.m: Test case. tests/valid/assoc_list.m: tests/valid/assoc_list_bug.m: Rename the assoc_list test case -- it interfered with other test cases attempting to import the assoc_list library module.
16 lines
300 B
Mathematica
16 lines
300 B
Mathematica
|
|
:- module intermod_nested_module_bug2__sub.
|
|
|
|
:- interface.
|
|
|
|
:- type post == assoc_list(string).
|
|
|
|
:- pred read_post(cgi, maybe_error(post), io, io).
|
|
:- mode read_post(in, out, di, uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
read_post(_CGI, error("foo")) --> [].
|
|
|
|
:- end_module intermod_nested_module_bug2__sub.
|