diff options
Diffstat (limited to 'testsuite/tests/patsyn/should_compile/T16509.hs')
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T16509.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/patsyn/should_compile/T16509.hs b/testsuite/tests/patsyn/should_compile/T16509.hs new file mode 100644 index 0000000000..b848811119 --- /dev/null +++ b/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 + |