Skip to content
Snippets Groups Projects
Commit a5b14ad4 authored by KevinBuhr's avatar KevinBuhr Committed by Marge Bot
Browse files

Add test for old issue displaying unboxed tuples in error messages (#502)

parent 5bfd28f5
No related branches found
No related tags found
No related merge requests found
{-# LANGUAGE MagicHash, UnboxedTuples #-}
module T502 where
-- As per #502, the following type error message should correctly
-- display the unboxed tuple type.
bar :: Int
bar = snd foo
where foo :: (# Int, Int #)
foo = undefined
T502.hs:8:11: error:
• Couldn't match expected type ‘(a0, Int)’
with actual type ‘(# Int, Int #)’
• In the first argument of ‘snd’, namely ‘foo’
In the expression: snd foo
In an equation for ‘bar’:
bar
= snd foo
where
foo :: (# Int, Int #)
foo = undefined
...@@ -515,3 +515,4 @@ test('T16204c', normal, compile_fail, ['']) ...@@ -515,3 +515,4 @@ test('T16204c', normal, compile_fail, [''])
test('T16394', normal, compile_fail, ['']) test('T16394', normal, compile_fail, [''])
test('T16414', normal, compile_fail, ['']) test('T16414', normal, compile_fail, [''])
test('T16627', normal, compile_fail, ['']) test('T16627', normal, compile_fail, [''])
test('T502', normal, compile_fail, [''])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment