[Git][ghc/ghc][master] testsuite: Add test for #16509

Marge Bot gitlab at gitlab.haskell.org
Sun Jun 9 22:46:12 UTC 2019



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
8a48a8a4 by Ben Gamari at 2019-06-09T22:46:08Z
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,5 +77,6 @@ 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'])
 test('T16682', [extra_files(['T16682.hs', 'T16682a.hs'])],
                multimod_compile, ['T16682', '-v0 -fwarn-incomplete-patterns -fno-code'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/8a48a8a4e2f14f7f01aa1d4cf249420c908edb73

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/8a48a8a4e2f14f7f01aa1d4cf249420c908edb73
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/20190609/3b865874/attachment.html>


More information about the ghc-commits mailing list