Testsuite: add test for #10781
authorThomas Miedema <thomasmiedema@gmail.com>
Thu, 17 Sep 2015 01:25:11 +0000 (03:25 +0200)
committerThomas Miedema <thomasmiedema@gmail.com>
Thu, 17 Sep 2015 01:26:02 +0000 (03:26 +0200)
testsuite/tests/rename/should_fail/T10781.hs [new file with mode: 0644]
testsuite/tests/rename/should_fail/T10781.stderr [new file with mode: 0644]
testsuite/tests/rename/should_fail/all.T

diff --git a/testsuite/tests/rename/should_fail/T10781.hs b/testsuite/tests/rename/should_fail/T10781.hs
new file mode 100644 (file)
index 0000000..9991c94
--- /dev/null
@@ -0,0 +1,12 @@
+module T10781 where
+{- ghc-7.10.2 reported:
+
+T10781.hs:6:5:
+    Found hole ‘_name’ with type: t
+    Where: ‘t’ is a rigid type variable bound by
+               the inferred type of f :: t at T10781.hs:6:1
+    Relevant bindings include f :: t (bound at T10781.hs:6:1)
+    In the expression: Foo._name
+    In an equation for ‘f’: f = Foo._name
+-}
+f = Foo._name
diff --git a/testsuite/tests/rename/should_fail/T10781.stderr b/testsuite/tests/rename/should_fail/T10781.stderr
new file mode 100644 (file)
index 0000000..5d4dc3c
--- /dev/null
@@ -0,0 +1,2 @@
+
+T10781.hs:12:5: error: Not in scope: ‘Foo._name’
index bd717dd..48814ec 100644 (file)
@@ -137,3 +137,4 @@ test('T9032',
 test('T10618', normal, compile_fail, [''])
 test('T10668', normal, compile_fail, [''])
 test('T5001b', normal, compile_fail, [''])
+test('T10781', normal, compile_fail, [''])