[Git][ghc/ghc][wip/T16509-test] testsuite: Add test for #16509
Ben Gamari
gitlab at gitlab.haskell.org
Tue May 28 21:41:52 UTC 2019
Ben Gamari pushed to branch wip/T16509-test at Glasgow Haskell Compiler / GHC
Commits:
4b1addca by Ben Gamari at 2019-05-28T21:41:44Z
testsuite: Add test for #16509
- - - - -
3 changed files:
- + testsuite/tests/patsyn/should_compile/T16509.hs
- + testsuite/tests/patsyn/should_compile/T16509.script
- testsuite/tests/patsyn/should_compile/all.T
Changes:
=====================================
testsuite/tests/patsyn/should_compile/T16509.hs
=====================================
@@ -0,0 +1,12 @@
+{-# LANGUAGE PatternSynonyms #-}
+{-# LANGUAGE ViewPatterns #-}
+
+module PatternPanic where
+
+pattern TestPat :: (Int, Int)
+pattern TestPat <- (isSameRef -> True, 0)
+
+isSameRef :: Int -> Bool
+isSameRef e | 0 <- e = True
+isSameRef _ = False
+
=====================================
testsuite/tests/patsyn/should_compile/T16509.script
=====================================
@@ -0,0 +1 @@
+:load T16509.hs
=====================================
testsuite/tests/patsyn/should_compile/all.T
=====================================
@@ -77,3 +77,4 @@ test('T14326', normal, compile, [''])
test('T14394', normal, ghci_script, ['T14394.script'])
test('T14552', normal, compile, [''])
test('T14498', normal, compile, [''])
+test('T16509', expect_broken(16509), ghci_script, ['T16509.script'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/4b1addca61800eb199c504a7183c2a8f7d4135df
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/4b1addca61800eb199c504a7183c2a8f7d4135df
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190528/538b35c7/attachment.html>
More information about the ghc-commits
mailing list