[GHC] #9006: GHC accepts import of private data constructor if it has the same name as the type
GHC
ghc-devs at haskell.org
Fri Apr 18 23:30:36 UTC 2014
#9006: GHC accepts import of private data constructor if it has the same name as
the type
------------------------------------------------+--------------------------
Reporter: Lemming | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC accepts invalid program | Unknown/Multiple
Test Case: rename/should_fail/T9006 | Difficulty:
Blocking: | Unknown
| Blocked By:
| Related Tickets:
------------------------------------------------+--------------------------
Comment (by simonpj):
Here's the commit
{{{
commit f964cd9c5c411f8a2383cf2b080581a5c3349661
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Apr 18 23:30:18 2014 +0100
Take account of the AvailTC invariant when importing
In the rather gnarly filterImports code, someone had forgotten
the AvailTC invariant: in AvailTC n [n,s1,s2], the 'n' is itself
included in the list of names.
compiler/rename/RnNames.lhs | 80
+++++++++++++++----------
testsuite/tests/rename/should_fail/T9006.hs | 3 +
testsuite/tests/rename/should_fail/T9006.stderr | 2 +
testsuite/tests/rename/should_fail/T9006a.hs | 3 +
testsuite/tests/rename/should_fail/all.T | 3 +
5 files changed, 59 insertions(+), 32 deletions(-)
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9006#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list