summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Senn <rsx@bluewin.ch>2021-06-05 18:45:39 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-07-01 03:29:58 -0400
commitf79615d2df9327cde8aae66c6ec211031b69b83c (patch)
tree250b4ddc5c2c123818e09ff3308ed00abae19d6e
parent2ce7c5153f36dc254f65f766d73ef92251b5aaf7 (diff)
downloadhaskell-f79615d2df9327cde8aae66c6ec211031b69b83c.tar.gz
Add testcase for #19460
Avoid an other regression.
-rw-r--r--testsuite/tests/ghci/should_run/T19460.hs5
-rw-r--r--testsuite/tests/ghci/should_run/T19460.script4
-rw-r--r--testsuite/tests/ghci/should_run/T19460.stdout5
-rw-r--r--testsuite/tests/ghci/should_run/all.T1
4 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/should_run/T19460.hs b/testsuite/tests/ghci/should_run/T19460.hs
new file mode 100644
index 0000000000..14a04d96e2
--- /dev/null
+++ b/testsuite/tests/ghci/should_run/T19460.hs
@@ -0,0 +1,5 @@
+module T19460 (Foo(..)) where
+
+class Foo a where
+ bar :: a -> ()
+ bar _ = ()
diff --git a/testsuite/tests/ghci/should_run/T19460.script b/testsuite/tests/ghci/should_run/T19460.script
new file mode 100644
index 0000000000..fd4d1daa44
--- /dev/null
+++ b/testsuite/tests/ghci/should_run/T19460.script
@@ -0,0 +1,4 @@
+:l T19460
+data T = T
+instance Foo T
+:info Foo
diff --git a/testsuite/tests/ghci/should_run/T19460.stdout b/testsuite/tests/ghci/should_run/T19460.stdout
new file mode 100644
index 0000000000..fdab49276f
--- /dev/null
+++ b/testsuite/tests/ghci/should_run/T19460.stdout
@@ -0,0 +1,5 @@
+type Foo :: * -> Constraint
+class Foo a where
+ bar :: a -> ()
+ -- Defined at T19460.hs:3:1
+instance [safe] Foo T -- Defined at <interactive>:3:10
diff --git a/testsuite/tests/ghci/should_run/all.T b/testsuite/tests/ghci/should_run/all.T
index aa92930d90..9421768546 100644
--- a/testsuite/tests/ghci/should_run/all.T
+++ b/testsuite/tests/ghci/should_run/all.T
@@ -77,4 +77,5 @@ test('T18064',
['T18064.script'])
test('T18594', just_ghci, ghci_script, ['T18594.script'])
test('T18562', just_ghci, ghci_script, ['T18562.script'])
+test('T19460', just_ghci, ghci_script, ['T19460.script'])
test('T19733', just_ghci, compile_and_run, [''])