summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-05-31 17:39:34 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-06-01 07:44:44 -0400
commit320270c2a1cb51fb02f713f80083eb9eff488c31 (patch)
tree4fa2ce2d3240f7f4d0c4760ada21eb53f022213c
parent7975202ba9010c581918413808ee06fbab9ac85f (diff)
downloadhaskell-320270c2a1cb51fb02f713f80083eb9eff488c31.tar.gz
Add test for #21619
Fixes #21619
-rw-r--r--testsuite/tests/quotes/T21619.hs10
-rw-r--r--testsuite/tests/quotes/all.T1
2 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/quotes/T21619.hs b/testsuite/tests/quotes/T21619.hs
new file mode 100644
index 0000000000..ae37efcb48
--- /dev/null
+++ b/testsuite/tests/quotes/T21619.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# OPTIONS_GHC -fwrite-ide-info #-}
+module M where
+
+import Language.Haskell.TH.Syntax
+
+newtype T = T { getT :: Int }
+
+instance Lift T where
+ liftTyped v = [||T $$(liftTyped (getT v))||]
diff --git a/testsuite/tests/quotes/all.T b/testsuite/tests/quotes/all.T
index 1d145e8781..4a39f454b3 100644
--- a/testsuite/tests/quotes/all.T
+++ b/testsuite/tests/quotes/all.T
@@ -40,3 +40,4 @@ test('TTH_top_splice', normal, compile_fail, [''])
test('TH_double_splice', normal, compile_fail, [''])
test('T20688', normal, compile, ['-Wimplicit-lift -Werror'])
test('T20893', normal, compile_and_run, [''])
+test('T21619', normal, compile, [''])