mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-17 23:05:21 +00:00
Fix a bug which caused misleading error messages when
Estimated hours taken: 1
Branches: main
Fix a bug which caused misleading error messages when
the module qualifier for an undefined symbol matched a
module imported only by ancestor modules.
compiler/make_hlds.m:
Add modules imported by ancestor modules to the list
of imported modules.
compiler/modules.m:
compiler/prog_data.m:
compiler/hlds_pred.m:
compiler/*.m:
Record which items are imported from ancestor modules.
Reorder the arguments of `modules__append_pseudo_decl'
to make it easier to use with state variables.
Use state variable syntax in `modules__grab_imported_modules'.
compiler/hlds_module.m:
Remove an XXX comment documenting this bug.
configure.in:
Check for state variable syntax when checking whether
the compiler is up-to-date.
tests/invalid/Mmakefile:
tests/invalid/import_in_parent.{m,err_exp}:
Test case.
This commit is contained in:
@@ -966,13 +966,13 @@
|
||||
% such items need to be exported to the
|
||||
% sub-modules.
|
||||
|
||||
; imported(section)
|
||||
; imported(import_locn)
|
||||
% This is used internally by the compiler,
|
||||
% to identify declarations which originally
|
||||
% came from some other module imported with
|
||||
% a `:- import_module' declaration, and which
|
||||
% section the module was imported.
|
||||
; used(section)
|
||||
; used(import_locn)
|
||||
% This is used internally by the compiler,
|
||||
% to identify declarations which originally
|
||||
% came from some other module and for which
|
||||
@@ -1014,6 +1014,11 @@
|
||||
---> implementation
|
||||
; interface.
|
||||
|
||||
:- type import_locn
|
||||
---> implementation
|
||||
; interface
|
||||
; ancestor.
|
||||
|
||||
:- type sym_list
|
||||
---> sym(list(sym_specifier))
|
||||
; pred(list(pred_specifier))
|
||||
|
||||
Reference in New Issue
Block a user