Ticket #5434 (closed bug: fixed)

Opened 21 months ago

Last modified 21 months ago

<no location info> for shadowing warnings in TH-generated code

Reported by: byorgey Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.2.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect warning at compile-time Difficulty:
Test Case: th/T5434 Blocked By:
Blocking: Related Tickets:

Description (last modified by igloo) (diff)

See attached test case, which causes this warning to be printed when THShadowSplice.hs is compiled with -Wall:

<no location info>:
    Warning: This binding for `x' shadows the existing binding
               bound at THShadowSplice.hs:7:3

There ought to be some location info. I have also seen warnings of the form

<no location info>:
    Warning: This binding for `x' shadows the existing binding
               bound at <no location info>

although I have not yet been able to construct a small test case which exhibits this behavior.

Attachments

THShadow.hs Download (260 bytes) - added by byorgey 21 months ago.
THShadowSplice.hs Download (108 bytes) - added by byorgey 21 months ago.

Change History

Changed 21 months ago by byorgey

Changed 21 months ago by byorgey

Changed 21 months ago by igloo

  • description modified (diff)

Changed 21 months ago by simonpj@…

commit 68bcb1399c8cd17f6db641a68fd4d20fff08c01a

Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Sep 2 09:11:24 2011 +0100

    Make Convert.thRdrName give a decent source locations (fixes Trac #5434)
    
    thRdrName is used to construct *binders*, and some of them are
    Exact RdrNames, so we need to give them a decent source location.

 compiler/hsSyn/Convert.lhs |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

Changed 21 months ago by simonpj

  • status changed from new to closed
  • testcase set to th/T5434
  • resolution set to fixed

Thanks. Fixed and test added.

Note: See TracTickets for help on using tickets.