mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-24 13:53:54 +00:00
Estimated hours taken: 2
Branches: main, release
Fix a bug in inter-mdule optimization reported by Michael Day.
compiler/intermod.m:
Write declarations for `exported_to_submodules' predicates
and functions to the `.opt' file.
tests/valid/Mmakefile:
tests/valid/Mercury.options:
tests/valid/intermod_nested{,2}.m:
Test case.
23 lines
314 B
Mathematica
23 lines
314 B
Mathematica
:- module intermod_nested2.
|
|
|
|
:- interface.
|
|
|
|
:- module intermod_nested2__bar.
|
|
|
|
:- interface.
|
|
|
|
:- type bar ---> bar.
|
|
|
|
:- end_module intermod_nested2__bar.
|
|
|
|
:- implementation.
|
|
|
|
:- import_module int.
|
|
|
|
% Check that `exported_to_submodules' functions are declared
|
|
% in the `.opt' file.
|
|
:- func foo = int.
|
|
|
|
foo = 1.
|
|
|