Test Trac #5533
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 21 Oct 2011 15:54:24 +0000 (16:54 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 21 Oct 2011 15:54:24 +0000 (16:54 +0100)
testsuite/tests/rename/should_fail/T5533.hs [new file with mode: 0644]
testsuite/tests/rename/should_fail/T5533.stderr [new file with mode: 0644]
testsuite/tests/rename/should_fail/all.T

diff --git a/testsuite/tests/rename/should_fail/T5533.hs b/testsuite/tests/rename/should_fail/T5533.hs
new file mode 100644 (file)
index 0000000..21646f4
--- /dev/null
@@ -0,0 +1,6 @@
+module T5533 where
+
+data T a = CT {f1 :: Int -> a, f2 :: Double}
+f2 :: Int -> Double
+g x = CT {f1 = \t -> f2 t + x, f2 = x}
+
diff --git a/testsuite/tests/rename/should_fail/T5533.stderr b/testsuite/tests/rename/should_fail/T5533.stderr
new file mode 100644 (file)
index 0000000..b462851
--- /dev/null
@@ -0,0 +1,4 @@
+
+T5533.hs:4:1:
+    The type signature for `f2' lacks an accompanying binding
+      (You cannot give a type signature for a record selector or class method)
index 5981982..ef7f857 100644 (file)
@@ -92,4 +92,5 @@ test('T5385',
      multimod_compile_fail,
      ['T5385','-v0'])
 test('T5513', normal, compile_fail, [''])
+test('T5533', normal, compile_fail, [''])
 test('Misplaced', normal, compile_fail, [''])