summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/all.T
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2023-05-11 13:08:14 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-05-12 06:10:57 -0400
commitc176ad1835ccfe55e2bde875b4a35e9d226ff657 (patch)
tree585897cd4bdbb5babd5c86eaed88aa26a8a42595 /testsuite/tests/typecheck/should_fail/all.T
parenta856d98eb13401b78fa7eba9a54ea4c501ebb0a2 (diff)
downloadhaskell-c176ad1835ccfe55e2bde875b4a35e9d226ff657.tar.gz
Don't panic in mkNewTyConRhs
This function could come across invalid newtype constructors, as we only perform validity checking of newtypes once we are outside the knot-tied typechecking loop. This patch changes this function to fake up a stub type in the case of an invalid newtype, instead of panicking. This patch also changes "checkNewDataCon" so that it reports as many errors as possible at once. Fixes #23308
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/all.T')
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T1
1 files changed, 1 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index f62ee5e355..b6c4a0366d 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -676,6 +676,7 @@ test('PatSynExistential', normal, compile_fail, [''])
test('PatSynArity', normal, compile_fail, [''])
test('PatSynUnboundVar', normal, compile_fail, [''])
test('T21444', normal, compile_fail, [''])
+test('T23308', normal, compile_fail, [''])
test('MultiAssocDefaults', normal, compile_fail, [''])
test('LazyFieldsDisabled', normal, compile_fail, [''])
test('TyfamsDisabled', normal, compile_fail, [''])