Bug in module scoping of nested substructures with `with'

From: Warwick Harvey <wh_at_icparc.ic.ac.uk>
Date: Fri 12 Oct 2001 11:44:31 AM GMT
Message-ID: <20011012124431.O28107@tempest.icparc.ic.ac.uk>
Hi,

Suppose more than one module defines a structure with the same name and
arity (say foo/2), and exactly one of these modules is imported into another
module M.  If foo/2 is named as a substructure of a structure in M, and then
`with' is used to access foo/2 or any of its substructures, then both
definitions of foo/2 are visible.

Attached is an example where a perfectly legal structure usage results in
the wrong answer because the wrong definition of foo/2 was selected by
`with'.

I intend to commit a fix and a test for this shortly.

Cheers,
Warwick



Received on Fri Oct 12 12:44:32 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:10 PM GMT GMT