[commit: testsuite] master: Test Trac #2354 (2a4da73)

Simon Peyton Jones simonpj at microsoft.com
Fri Feb 15 16:17:22 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/2a4da7313f5f16bb0de00df290e1246ae03f0966

>---------------------------------------------------------------

commit 2a4da7313f5f16bb0de00df290e1246ae03f0966
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Feb 15 15:16:49 2013 +0000

    Test Trac #2354

>---------------------------------------------------------------

 tests/typecheck/should_fail/T2354.hs     |    7 +++++++
 tests/typecheck/should_fail/T2354.stderr |    6 ++++++
 tests/typecheck/should_fail/all.T        |    1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/tests/typecheck/should_fail/T2354.hs b/tests/typecheck/should_fail/T2354.hs
new file mode 100644
index 0000000..7bc1d40
--- /dev/null
+++ b/tests/typecheck/should_fail/T2354.hs
@@ -0,0 +1,7 @@
+module T2354(test) where 
+ 
+class AsInt a where 
+  {-# NOINLINE toInt #-} 
+  toInt   :: a -> Int 
+  {-# NOINLINE fromInt #-} 
+  fromInt :: Int -> a 
diff --git a/tests/typecheck/should_fail/T2354.stderr b/tests/typecheck/should_fail/T2354.stderr
new file mode 100644
index 0000000..da21f79
--- /dev/null
+++ b/tests/typecheck/should_fail/T2354.stderr
@@ -0,0 +1,6 @@
+
+T2354.hs:4:3:
+    The INLINE pragma for default method `toInt' lacks an accompanying binding
+
+T2354.hs:6:3:
+    The INLINE pragma for default method `fromInt' lacks an accompanying binding
diff --git a/tests/typecheck/should_fail/all.T b/tests/typecheck/should_fail/all.T
index de9cbb8..0750c57 100644
--- a/tests/typecheck/should_fail/all.T
+++ b/tests/typecheck/should_fail/all.T
@@ -296,3 +296,4 @@ test('T7279', normal, compile_fail, [''])
 test('T2247', normal, compile_fail, [''])
 test('T7609', normal, compile_fail, [''])
 test('T7645', normal, compile_fail, [''])
+test('T2354', normal, compile_fail, ['-O'])





More information about the ghc-commits mailing list