From 72b21c393831b49867a296f19a2d039e48bb8dcd Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Thu, 18 Jun 2015 16:19:50 +0200 Subject: Parser: commas_tup_tail duplicate SrcSpan on "Missing" value Summary: Parsing {-# LANGUAGE TupleSections #-} baz = (1, "hello", 6.5,,) 'a' (Just ()) Results in the following AST fragment (L tests/examples/Tuple.hs:3:7-25 (ExplicitTuple [ L tests/examples/Tuple.hs:3:8 (Present (L tests/examples/Tuple.hs:3:8 (HsOverLit (OverLit (HsIntegral [ '1' ] 1) PlaceHolder (HsLit (HsString [] {abstract:FastString})) PlaceHolder)))) , L tests/examples/Tuple.hs:3:11-17 (Present (L tests/examples/Tuple.hs:3:11-17 (HsLit (HsString [ '"' , 'h' , 'e' , 'l' , 'l' , 'o' , '"' ] {abstract:FastString})))) , L tests/examples/Tuple.hs:3:20-22 (Present (L tests/examples/Tuple.hs:3:20-22 (HsOverLit (OverLit (HsFractional (FL [ '6' , '.' , '5' ] (:% 13 2))) PlaceHolder (HsLit (HsString [] {abstract:FastString})) PlaceHolder)))) , L tests/examples/Tuple.hs:3:24 (Missing PlaceHolder) , L tests/examples/Tuple.hs:3:24 (Missing PlaceHolder) ] The final `Missing PlaceHolder` has a duplicated `SrcSpan` Test Plan: ./validate Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D995 GHC Trac Issues: #10537 --- testsuite/tests/ghc-api/annotations/exampleTest.stdout | 3 +-- testsuite/tests/ghc-api/annotations/parseTree.stdout | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'testsuite/tests/ghc-api') diff --git a/testsuite/tests/ghc-api/annotations/exampleTest.stdout b/testsuite/tests/ghc-api/annotations/exampleTest.stdout index cd6f9c0dd4..210a4d8ae0 100644 --- a/testsuite/tests/ghc-api/annotations/exampleTest.stdout +++ b/testsuite/tests/ghc-api/annotations/exampleTest.stdout @@ -1,10 +1,9 @@ ---Problems--------------------- [ -(AK AnnEofPos = [AnnotationTuple.hs:32:1]) ] ---Problems'-------------------- -[(AnnEofPos, AnnotationTuple.hs:32:1)] +[] -------------------------------- [ (AK AnnotationTuple.hs:1:1 AnnCloseC = [AnnotationTuple.hs:27:1]) diff --git a/testsuite/tests/ghc-api/annotations/parseTree.stdout b/testsuite/tests/ghc-api/annotations/parseTree.stdout index f7d1e5d67b..7d651aaffb 100644 --- a/testsuite/tests/ghc-api/annotations/parseTree.stdout +++ b/testsuite/tests/ghc-api/annotations/parseTree.stdout @@ -8,8 +8,7 @@ (AnnotationTuple.hs:16:20-22, [p], (6.5)), (AnnotationTuple.hs:16:24, [m], ()), (AnnotationTuple.hs:16:25, [m], ()), - (AnnotationTuple.hs:16:26, [m], ()), - (AnnotationTuple.hs:16:26, [m], ())] + (AnnotationTuple.hs:16:26, [m], ()), (, [m], ())] [ (AK AnnotationTuple.hs:1:1 AnnCloseC = [AnnotationTuple.hs:27:1]) -- cgit v1.2.1