Commit 10a97120 authored by Ben Gamari's avatar Ben Gamari 🐢

testsuite: Add testcase for #16394

parent 36546a43
Pipeline #3534 failed with stages
in 129 minutes and 11 seconds
{-# LANGUAGE PolyKinds, TypeFamilies, DataKinds #-}
class C a where
type T (n :: a)
instance C a => C b => C (a, b) where
type T '(n, m) = (T n, T m)
-- but this worked fine:
--
-- instance (C a, C b) => C (a, b) where
-- type T '(n, m) = (T n, T m)
T16394.hs:6:10: error:
Illegal class instance: ‘C a => C b => C (a, b)’
Class instances must be of the form
context => C ty_1 ... ty_n
where ‘C’ is a class
......@@ -510,4 +510,5 @@ test('T16059e', [extra_files(['T16059b.hs'])], multimod_compile_fail,
['T16059e', '-v0'])
test('T16255', normal, compile_fail, [''])
test('T16204c', normal, compile_fail, [''])
test('T16394', normal, compile_fail, [''])
test('T16414', normal, compile_fail, [''])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment