summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorsimonpj <simonpj@microsoft.com>2010-09-19 15:37:12 +0000
committersimonpj <simonpj@microsoft.com>2010-09-19 15:37:12 +0000
commitdb327f6627b0ca66748569158f6fe6f2b0677c5c (patch)
treeac0f2ed82236f5d3d0534a1037698951ca0a4a2c /testsuite/tests
parented7913d66c553dbd571341dc32d599c567ec2309 (diff)
downloadhaskell-db327f6627b0ca66748569158f6fe6f2b0677c5c.tar.gz
Add test for Trac #3696
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/ghc-regress/typecheck/should_compile/T3696.hs12
-rw-r--r--testsuite/tests/ghc-regress/typecheck/should_compile/T3696.stderr3
-rw-r--r--testsuite/tests/ghc-regress/typecheck/should_compile/all.T1
3 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/typecheck/should_compile/T3696.hs b/testsuite/tests/ghc-regress/typecheck/should_compile/T3696.hs
new file mode 100644
index 0000000000..af39ee85b7
--- /dev/null
+++ b/testsuite/tests/ghc-regress/typecheck/should_compile/T3696.hs
@@ -0,0 +1,12 @@
+{-# OPTIONS -Wall #-}
+
+module T3696 where
+
+class C a where c :: a
+
+instance C Int where c = 37
+
+def = c
+
+use :: Int
+use = def
diff --git a/testsuite/tests/ghc-regress/typecheck/should_compile/T3696.stderr b/testsuite/tests/ghc-regress/typecheck/should_compile/T3696.stderr
new file mode 100644
index 0000000000..1784e53511
--- /dev/null
+++ b/testsuite/tests/ghc-regress/typecheck/should_compile/T3696.stderr
@@ -0,0 +1,3 @@
+
+T3696.hs:9:1:
+ Warning: Top-level binding with no type signature: def :: Int
diff --git a/testsuite/tests/ghc-regress/typecheck/should_compile/all.T b/testsuite/tests/ghc-regress/typecheck/should_compile/all.T
index 0525704cb0..7b0817e011 100644
--- a/testsuite/tests/ghc-regress/typecheck/should_compile/all.T
+++ b/testsuite/tests/ghc-regress/typecheck/should_compile/all.T
@@ -318,4 +318,5 @@ test('T2412',
test('T2846', normal, compile, [''])
test('T4284', normal, compile, [''])
test('T2683', normal, compile, [''])
+test('T3696', normal, compile, [''])