diff: bug fix for Tom's error reporting change

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Sep 30 03:39:59 AEST 1998


Tom, can you please review this one, and add a test case?

--------------------

Estimated hours taken: 0.5

compiler/typecheck.m:
	Fix a bug in conway's recent change to error reporting for
	undefined explicitly qualified names: the current module is
	always in scope, so don't say that it is not imported.

Index: compiler/typecheck.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.249
diff -u -r1.249 typecheck.m
--- typecheck.m	1998/09/24 10:10:03	1.249
+++ typecheck.m	1998/09/29 17:05:58
@@ -4708,6 +4708,9 @@
 	{ module_info_get_imported_module_specifiers(ModuleInfo,
 		ImportedModules) },
 	(
+		% the visible modules are the current module, any
+		% imported modules, and any ancestor modules.
+		{ ModuleQualifier \= ThisModule },
 		{ \+ set__member(ModuleQualifier, ImportedModules) },
 		{ get_ancestors(ThisModule, ParentModules) },
 		{ \+ list__member(ModuleQualifier, ParentModules) }

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list