summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColten Webb <coltenwebb@gmail.com>2022-07-05 11:15:32 -0500
committerZubin Duggal <zubin.duggal@gmail.com>2022-07-19 15:19:36 +0530
commit11441162f41bebd86c7d9da0c1924799e4ac4e1a (patch)
tree86df164c7d560a8c801c3b8242c18353f7ae6e3d
parent11782f0f95fba039fc7c1254b6e269d2a219f0f4 (diff)
downloadhaskell-11441162f41bebd86c7d9da0c1924799e4ac4e1a.tar.gz
Compute record-dot-syntax types
Ensures type information for record-dot-syntax is included in HieASTs. See #21797 (cherry picked from commit 5434d1a355e127d44c6f116b4b7f8a1d254815d4)
-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 7bd9912a2e..e309fe7d47 100644
--- a/compiler/GHC/Iface/Ext/Ast.hs
+++ b/compiler/GHC/Iface/Ext/Ast.hs
@@ -744,6 +744,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