Ticket #1384 (closed bug: fixed)

Opened 6 years ago

Last modified 5 years ago

Exporting a module that isn't imported doesn't fail

Reported by: igloo Owned by: igloo
Priority: high Milestone: 6.8.1
Component: Compiler Version: 6.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: rnfail028 Blocked By:
Blocking: Related Tickets:

Description

Exporting a module that isn't imported doesn't fail.

An example is, from rnfail028:

-- !!! illegal to export a module we haven't imported.
module ShouldFail ( module List ) where

Change History

Changed 6 years ago by igloo

  • version changed from 6.6.1 to 6.7

Changed 6 years ago by simonpj

Yes, this is bug all right. The Report says

It is an error to use module M in an export list unless M is the module bearing the export list, or M is imported by at least one import declaration (qualified or unqualified).

Fixing this involves the same data structures as those used for reporting unused imports, so it would be sensible to fix this bug at the same time as #1074

Simon

Changed 6 years ago by igloo

  • owner set to igloo

Changed 6 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Fixed, but this area of code could really do with a rewrite.

Changed 6 years ago by igloo

  • milestone changed from 6.8 branch to 6.8.1

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.