Commit cd4a7d07 authored by Alan Zimmerman's avatar Alan Zimmerman

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))
| otherwise
-> finishHsVar (L l name) ;
Just (Right [f]) -> return (HsRecFld (ambiguousFieldOcc f)
, unitFV (selectorFieldOcc f)) ;
Just (Right [f@(FieldOcc (L _ fn) s)]) ->
return (HsRecFld (ambiguousFieldOcc (FieldOcc (L l fn) s))
, unitFV (selectorFieldOcc f)) ;
Just (Right fs@(_:_:_)) -> return (HsRecFld (Ambiguous (L l v)
PlaceHolder)
, 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