diff options
Diffstat (limited to 'testsuite/tests/rename/prog003')
-rw-r--r-- | testsuite/tests/rename/prog003/A.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/rename/prog003/B.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/rename/prog003/Makefile | 3 | ||||
-rw-r--r-- | testsuite/tests/rename/prog003/rename.prog003.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/rename/prog003/rename.prog003.stderr-hugs | 1 | ||||
-rw-r--r-- | testsuite/tests/rename/prog003/test.T | 4 |
6 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/rename/prog003/A.hs b/testsuite/tests/rename/prog003/A.hs new file mode 100644 index 0000000000..6b68075f96 --- /dev/null +++ b/testsuite/tests/rename/prog003/A.hs @@ -0,0 +1,2 @@ +module A(method) where +class Class a where method :: a -> a diff --git a/testsuite/tests/rename/prog003/B.hs b/testsuite/tests/rename/prog003/B.hs new file mode 100644 index 0000000000..77be6cbc0e --- /dev/null +++ b/testsuite/tests/rename/prog003/B.hs @@ -0,0 +1,5 @@ +-- !!! Exporting a class method should not export the class too +module B where +import A +f :: Class a => a -> a +f = method diff --git a/testsuite/tests/rename/prog003/Makefile b/testsuite/tests/rename/prog003/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/rename/prog003/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/rename/prog003/rename.prog003.stderr b/testsuite/tests/rename/prog003/rename.prog003.stderr new file mode 100644 index 0000000000..49c264cae8 --- /dev/null +++ b/testsuite/tests/rename/prog003/rename.prog003.stderr @@ -0,0 +1,2 @@ + +B.hs:4:6: Not in scope: type constructor or class `Class' diff --git a/testsuite/tests/rename/prog003/rename.prog003.stderr-hugs b/testsuite/tests/rename/prog003/rename.prog003.stderr-hugs new file mode 100644 index 0000000000..5cb62fcdf2 --- /dev/null +++ b/testsuite/tests/rename/prog003/rename.prog003.stderr-hugs @@ -0,0 +1 @@ +ERROR "B.hs":4 - Undefined class "Class" diff --git a/testsuite/tests/rename/prog003/test.T b/testsuite/tests/rename/prog003/test.T new file mode 100644 index 0000000000..7d4c06ab0e --- /dev/null +++ b/testsuite/tests/rename/prog003/test.T @@ -0,0 +1,4 @@ +test('rename.prog003', + extra_clean(['A.hi', 'A.o']), + multimod_compile_fail, + ['B', '-v0']) |