Commit 5026840f authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

testsuite: Add test for #15232

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #15232

Differential Revision: https://phabricator.haskell.org/D4807
parent 0361fc03
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wredundant-constraints -Wall -Werror #-}
import GHC.TypeLits (TypeError, ErrorMessage(..))
class C a where f :: a -> a
instance {-# OVERLAPPING #-} C Int where f _ = 42
instance {-# OVERLAPPABLE #-} TypeError ( 'Text "Only Int is supported" ) => C a where f = undefined
main :: IO ()
main = print $ f (42::Int)
......@@ -621,4 +621,5 @@ test('SplitWD', normal, compile, [''])
test('T14441', omit_ways(['profasm']), compile, [''])
test('T15050', [expect_broken(15050)], compile, [''])
test('T14735', normal, compile, [''])
test('T15232', expect_broken(15232), compile, [''])
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