summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Grenrus <oleg.grenrus@iki.fi>2021-10-26 15:36:47 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-02-16 05:27:56 -0500
commit84eaa26fda63abb2681215a42c152e770ea552ca (patch)
treeef8487c72c7d0cb4d33744b542b4484a0976d6cc
parentacb482cc198bc6fbc5b0f7d93fd493853c77671f (diff)
downloadhaskell-84eaa26fda63abb2681215a42c152e770ea552ca.tar.gz
Add test for #20562
-rw-r--r--testsuite/tests/module/T20562.hs15
-rw-r--r--testsuite/tests/module/all.T1
2 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/module/T20562.hs b/testsuite/tests/module/T20562.hs
new file mode 100644
index 0000000000..352be5e9e2
--- /dev/null
+++ b/testsuite/tests/module/T20562.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE PatternSynonyms #-}
+module Main (main) where
+
+import GHC.Tuple
+
+type OneTuple = Solo
+
+only :: OneTuple a -> a
+only = getSolo
+
+pattern OneTuple :: a -> Solo a
+pattern OneTuple a = Solo a
+
+main :: IO ()
+main = print (only (OneTuple 'x'))
diff --git a/testsuite/tests/module/all.T b/testsuite/tests/module/all.T
index 4a2aacc26f..212d9ecbb7 100644
--- a/testsuite/tests/module/all.T
+++ b/testsuite/tests/module/all.T
@@ -292,3 +292,4 @@ test('T13528', normal, compile, [''])
test('T13622', normal, compile, [''])
test('T13704a', normal, compile, ['-main-is Main.program'])
test('T13704b', [], multimod_compile, ['T13704b1.hs T13704b2.hs', '-main-is T13704b2.program -v0'])
+test('T20562', normal, compile, [''])