summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-11-08 00:20:15 +0100
committerBen Gamari <ben@smart-cactus.org>2015-11-08 00:54:05 +0100
commit8262c954ac3084f0dfcb6d5fa6e6172afd22eae7 (patch)
tree5ace14749ebc7966f10eb694e76ea181789d3072 /testsuite/tests
parentd9c1450a8e2f4af6a8347f64ba2cee98304dbe27 (diff)
downloadhaskell-8262c954ac3084f0dfcb6d5fa6e6172afd22eae7.tar.gz
Parser: allow empty multi-line deprecation warnings
This should work, {-# DEPRECATED someFunction [] #-} Test Plan: parser/should_compile/T3303 Reviewers: bgamari, austin Reviewed By: austin Subscribers: mpickering Differential Revision: https://phabricator.haskell.org/D1433 GHC Trac Issues: #11044
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/parser/should_compile/T3303.hs2
-rw-r--r--testsuite/tests/parser/should_compile/T3303.stderr5
-rw-r--r--testsuite/tests/parser/should_compile/T3303A.hs5
3 files changed, 11 insertions, 1 deletions
diff --git a/testsuite/tests/parser/should_compile/T3303.hs b/testsuite/tests/parser/should_compile/T3303.hs
index 08de52e6cd..7d9bfbd640 100644
--- a/testsuite/tests/parser/should_compile/T3303.hs
+++ b/testsuite/tests/parser/should_compile/T3303.hs
@@ -6,3 +6,5 @@ import T3303A
bar :: Int
bar = foo
+bar2 :: Int
+bar2 = foo2
diff --git a/testsuite/tests/parser/should_compile/T3303.stderr b/testsuite/tests/parser/should_compile/T3303.stderr
index df227f47ef..a8d2f631cf 100644
--- a/testsuite/tests/parser/should_compile/T3303.stderr
+++ b/testsuite/tests/parser/should_compile/T3303.stderr
@@ -1,6 +1,9 @@
-T3303.hs:7:7: Warning:
+T3303.hs:7:7: warning:
In the use of ‘foo’ (imported from T3303A):
Deprecated: "This is a multi-line
deprecation message
for foo"
+
+T3303.hs:10:8: warning:
+ In the use of ‘foo2’ (imported from T3303A): Deprecated: ""
diff --git a/testsuite/tests/parser/should_compile/T3303A.hs b/testsuite/tests/parser/should_compile/T3303A.hs
index daa4bfb91d..07a2eb8503 100644
--- a/testsuite/tests/parser/should_compile/T3303A.hs
+++ b/testsuite/tests/parser/should_compile/T3303A.hs
@@ -8,3 +8,8 @@ module T3303A where
foo :: Int
foo = 4
+-- Empty list should work too (#11044).
+{-# DEPRECATED foo2 [] #-}
+
+foo2 :: Int
+foo2 = 4