summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/rename/RnTypes.hs1
-rw-r--r--testsuite/tests/rename/should_compile/T13132.hs5
-rw-r--r--testsuite/tests/rename/should_compile/all.T1
3 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rename/RnTypes.hs b/compiler/rename/RnTypes.hs
index 6cd6ea805e..421fba5ef0 100644
--- a/compiler/rename/RnTypes.hs
+++ b/compiler/rename/RnTypes.hs
@@ -1227,6 +1227,7 @@ get_op :: LHsExpr Name -> Name
-- See RnExpr.rnUnboundVar
get_op (L _ (HsVar (L _ n))) = n
get_op (L _ (HsUnboundVar uv)) = mkUnboundName (unboundVarOcc uv)
+get_op (L _ (HsRecFld (Unambiguous _ n))) = n
get_op other = pprPanic "get_op" (ppr other)
-- Parser left-associates everything, but
diff --git a/testsuite/tests/rename/should_compile/T13132.hs b/testsuite/tests/rename/should_compile/T13132.hs
new file mode 100644
index 0000000000..70706074b3
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T13132.hs
@@ -0,0 +1,5 @@
+module Bug where
+
+newtype ContT r m a = ContT { runContT :: (a -> m r) -> m r }
+
+foo bar baz = (`runContT` bar.baz)
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T
index 90d955b7c8..296390524a 100644
--- a/testsuite/tests/rename/should_compile/all.T
+++ b/testsuite/tests/rename/should_compile/all.T
@@ -245,3 +245,4 @@ test('T12127',
test('T12533', normal, compile, [''])
test('T12597', normal, compile, [''])
test('T12548', normal, compile, [''])
+test('T13132', normal, compile, [''])