Files
mercury/tests/invalid/test_nested.err_exp
Fergus Henderson f4caf49a15 Fix a limitation of the current nested module support:
Estimated hours taken: 4

Fix a limitation of the current nested module support:
ensure that we check for attempts to import inaccessible modules.

compiler/modules.m:
	Check for attempts to import inaccessible modules
	(modules whose parent has not been imported,
	or for which there is no `include_module'
	declaration in the parent's interface).

compiler/intermod.m:
	Modify the way we import `.opt' files.  The previous method
	temporarily set the items field of the module_imports
	structure to [], but check_module_accessibility relies
	on the assumption that the items field contains the
	items for all modules previously read in.

tests/invalid/Mmakefile:
tests/invalid/test_nested.m:
tests/invalid/test_nested.err_exp:
tests/invalid/parent.m:
tests/invalid/parent.private_child.m:
tests/invalid/parent.public_child.m:
tests/invalid/parent.undeclared_child.m:
tests/invalid/parent.undeclared_child.err_exp:
tests/invalid/parent2.m:
tests/invalid/parent2.child.m:
	Add some tests for the above change.

doc/reference_manual.texi:
	Update the "bugs and limitations" sub-section of the modules
	chapter to reflect the new status quo.
1998-03-18 17:31:08 +00:00

13 lines
688 B
Plaintext

test_nested.m:009: In module `test_nested':
test_nested.m:009: error in `use_module' declaration:
test_nested.m:009: module `parent:private_child' is inaccessible.
test_nested.m:010: In module `test_nested':
test_nested.m:010: error in `use_module' declaration:
test_nested.m:010: module `parent:undeclared_child' is inaccessible.
test_nested.m:013: In module `test_nested':
test_nested.m:013: error in `use_module' declaration:
test_nested.m:013: module `parent2:child' is inaccessible.
test_nested.m:015: In definition of type `test_nested:foo'/0:
test_nested.m:015: error: undefined type `parent:nonexistent_child:foo'/0.
For more information, try recompiling with `-E'.