Commit a5b14ad4 authored by KevinBuhr's avatar KevinBuhr Committed by Marge Bot

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

parent 5bfd28f5
Pipeline #6177 failed with stages
in 304 minutes and 33 seconds
{-# 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’:
= snd foo
foo :: (# Int, Int #)
foo = undefined
......@@ -515,3 +515,4 @@ test('T16204c', normal, compile_fail, [''])
test('T16394', normal, compile_fail, [''])
test('T16414', normal, compile_fail, [''])
test('T16627', normal, compile_fail, [''])
test('T502', 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