summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColten Webb <coltenwebb@gmail.com>2022-07-05 11:15:32 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-07-16 07:21:15 -0400
commit5434d1a355e127d44c6f116b4b7f8a1d254815d4 (patch)
treecd94306f9a5f8540cab2136e64ec1fc1958eeb65
parentad8f3e150a895bfd3f8e2936be616ebfc4f531c6 (diff)
downloadhaskell-5434d1a355e127d44c6f116b4b7f8a1d254815d4.tar.gz
Compute record-dot-syntax types
Ensures type information for record-dot-syntax is included in HieASTs. See #21797
-rw-r--r--compiler/GHC/Iface/Ext/Ast.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/GHC/Iface/Ext/Ast.hs b/compiler/GHC/Iface/Ext/Ast.hs
index affe0e7ca4..64eac53af0 100644
--- a/compiler/GHC/Iface/Ext/Ast.hs
+++ b/compiler/GHC/Iface/Ext/Ast.hs
@@ -745,6 +745,7 @@ instance HiePass p => HasType (LocatedA (HsExpr (GhcPass p))) where
RecordCon con_expr _ _ -> computeType con_expr
ExprWithTySig _ e _ -> computeLType e
HsPragE _ _ e -> computeLType e
+ XExpr (ExpansionExpr (HsExpanded (HsGetField _ _ _) e)) -> Just (hsExprType e) -- for record-dot-syntax
XExpr (ExpansionExpr (HsExpanded _ e)) -> computeType e
XExpr (HsTick _ e) -> computeLType e
XExpr (HsBinTick _ _ e) -> computeLType e