diff options
author | Paolo Capriotti <p.capriotti@gmail.com> | 2012-08-23 13:35:50 +0100 |
---|---|---|
committer | Paolo Capriotti <p.capriotti@gmail.com> | 2012-08-24 10:06:31 +0100 |
commit | a284cd9aa587fd1aedfedd2767259408968e2746 (patch) | |
tree | 21caeb0f81257d8462e39228a0b4386bbf50c41c | |
parent | 3e7161b6e640ee8b799bc56c436ba506c34f93ca (diff) | |
download | haskell-a284cd9aa587fd1aedfedd2767259408968e2746.tar.gz |
Add regression test for dodgy import warning bug
-rw-r--r-- | testsuite/tests/rename/should_compile/DodgyA.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/rename/should_compile/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/rename/should_compile/dodgy.hs | 4 |
3 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/DodgyA.hs b/testsuite/tests/rename/should_compile/DodgyA.hs new file mode 100644 index 0000000000..39cb3eca84 --- /dev/null +++ b/testsuite/tests/rename/should_compile/DodgyA.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE TypeFamilies #-} + +module DodgyA(C(..), X(..)) where + +class C a where + data X a + +instance C Int where + data X Int = X1 Bool diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T index 4ec6ea5f17..d0d2487621 100644 --- a/testsuite/tests/rename/should_compile/all.T +++ b/testsuite/tests/rename/should_compile/all.T @@ -196,3 +196,7 @@ test('T7085', normal, compile, ['']) test('T7145a', normal, compile, ['-Wall -Werror']) test('T7145b', normal, compile, ['-Wall']) test('T6038', normal, compile, ['']) +test('dodgy', + [ extra_clean(['DodgyA.hi', 'DodgyA.o']) ], + multimod_compile, + ['dodgy', '-v0']) diff --git a/testsuite/tests/rename/should_compile/dodgy.hs b/testsuite/tests/rename/should_compile/dodgy.hs new file mode 100644 index 0000000000..ec18bbf8ec --- /dev/null +++ b/testsuite/tests/rename/should_compile/dodgy.hs @@ -0,0 +1,4 @@ +{-# OPTIONS_GHC -fwarn-dodgy-imports #-} +module Dodgy where + +import DodgyA (X(..)) |