Commit cd4a7d07 authored by Alan Zimmerman's avatar Alan Zimmerman
Browse files

renamer discards name location for HsRecField

When renaming a HsVar it can be converted to a HsRecField. In the
process the location of the enclosed name is converted to a noLoc

Closes #11576
parent f37bb548
...@@ -108,8 +108,9 @@ rnExpr (HsVar (L l v)) ...@@ -108,8 +108,9 @@ rnExpr (HsVar (L l v))
| otherwise | otherwise
-> finishHsVar (L l name) ; -> finishHsVar (L l name) ;
Just (Right [f]) -> return (HsRecFld (ambiguousFieldOcc f) Just (Right [f@(FieldOcc (L _ fn) s)]) ->
, unitFV (selectorFieldOcc f)) ; return (HsRecFld (ambiguousFieldOcc (FieldOcc (L l fn) s))
, unitFV (selectorFieldOcc f)) ;
Just (Right fs@(_:_:_)) -> return (HsRecFld (Ambiguous (L l v) Just (Right fs@(_:_:_)) -> return (HsRecFld (Ambiguous (L l v)
PlaceHolder) PlaceHolder)
, mkFVs (map selectorFieldOcc fs)); , mkFVs (map selectorFieldOcc fs));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment