summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2021-05-02 04:03:38 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-03 19:52:34 -0400
commit24a9b1708cee95670e7ec2a6ceb68e29fc376cf7 (patch)
treeb6c5ffadf9d3bb8c999070886103d7fffbd0fe19 /testsuite
parent7f5ee7194e18cc2c922839260817c16db8e95832 (diff)
downloadhaskell-24a9b1708cee95670e7ec2a6ceb68e29fc376cf7.tar.gz
Improve hs-boot binds error (#19781)
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/rename/should_fail/T19781.hs6
-rw-r--r--testsuite/tests/rename/should_fail/T19781.stderr6
-rw-r--r--testsuite/tests/rename/should_fail/T19781_A.hs7
-rw-r--r--testsuite/tests/rename/should_fail/T19781_A.hs-boot7
-rw-r--r--testsuite/tests/rename/should_fail/all.T1
5 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/T19781.hs b/testsuite/tests/rename/should_fail/T19781.hs
new file mode 100644
index 0000000000..1fbf64f24d
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T19781.hs
@@ -0,0 +1,6 @@
+module T19781 where
+
+import {-# SOURCE #-} T19781_A
+
+z :: Int
+z = x + y
diff --git a/testsuite/tests/rename/should_fail/T19781.stderr b/testsuite/tests/rename/should_fail/T19781.stderr
new file mode 100644
index 0000000000..1e468715aa
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T19781.stderr
@@ -0,0 +1,6 @@
+
+T19781_A.hs-boot:4:1: error:
+ Bindings in hs-boot files are not allowed
+
+T19781_A.hs-boot:7:1: error:
+ Bindings in hs-boot files are not allowed
diff --git a/testsuite/tests/rename/should_fail/T19781_A.hs b/testsuite/tests/rename/should_fail/T19781_A.hs
new file mode 100644
index 0000000000..9cde0c39ce
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T19781_A.hs
@@ -0,0 +1,7 @@
+module T19781_A where
+
+x :: Int
+x = 3
+
+y :: Int
+y = 4
diff --git a/testsuite/tests/rename/should_fail/T19781_A.hs-boot b/testsuite/tests/rename/should_fail/T19781_A.hs-boot
new file mode 100644
index 0000000000..9cde0c39ce
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T19781_A.hs-boot
@@ -0,0 +1,7 @@
+module T19781_A where
+
+x :: Int
+x = 3
+
+y :: Int
+y = 4
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index 475aef9c6c..a5dd61e575 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -164,3 +164,4 @@ test('T18240a', normal, compile_fail, [''])
test('T18240b', normal, compile_fail, [''])
test('T18740a', normal, compile_fail, [''])
test('T18740b', normal, compile_fail, [''])
+test('T19781', [extra_files(['T19781_A.hs', 'T19781_A.hs-boot'])], multimod_compile_fail, ['T19781', '-v0'])