Opened 3 years ago

Closed 3 years ago

#10214 closed bug (fixed)

parser: TransStmt has incorrect SrcSpan

Reported by: mpickering Owned by: alanz
Priority: normal Milestone: 7.10.2
Component: Compiler (Parser) Version: 7.10.1
Keywords: ApiAnnotations Cc: alanz
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D806
Wiki Page:

Description

The production for squals is.

squals :: { Located [LStmt RdrName (LHsExpr RdrName)] }   -- In reverse order, because the last
                                        -- one can "grab" the earlier ones
    : squals ',' transformqual
             {% addAnnotation (gl $ last $ unLoc $1) AnnComma (gl $2) >>
                return (sLL $1 $> [L (getLoc $3) ((unLoc $3) (reverse (unLoc $1)))]) }

The location of the whole statement is set to that transformqual when it fact it should encompass the whole production.

Change History (6)

comment:1 Changed 3 years ago by alanz

Milestone: 7.10.2

comment:2 Changed 3 years ago by alanz

Owner: set to alanz

comment:3 Changed 3 years ago by alanz

Status: newpatch

comment:4 Changed 3 years ago by alanz

Differential Rev(s): Phab:D806

comment:5 Changed 3 years ago by Austin Seipp <austin@…>

In cf196400609d920e7f8189b9376833f4f5886360/ghc:

The production for squals is incorrect; see D806 for specifics.

This diff depends on D803.

Reviewed By: austin

Differential Revision: https://phabricator.haskell.org/D806

GHC Trac Issues: #10214

comment:6 Changed 3 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Merged to ghc-7.10 and master.

Note: See TracTickets for help on using tickets.