diff options
author | sheaf <sam.derbyshire@gmail.com> | 2023-05-11 13:08:14 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-05-12 06:10:57 -0400 |
commit | c176ad1835ccfe55e2bde875b4a35e9d226ff657 (patch) | |
tree | 585897cd4bdbb5babd5c86eaed88aa26a8a42595 /testsuite/tests/typecheck/should_fail/all.T | |
parent | a856d98eb13401b78fa7eba9a54ea4c501ebb0a2 (diff) | |
download | haskell-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.T | 1 |
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, ['']) |