Commit e63fd2aa authored by ian@well-typed.com's avatar ian@well-typed.com

Add a test for T7895 (literal overflow)

parent 94378112
{-# LANGUAGE NegativeLiterals #-}
module T7895 where
import Data.Int
import Data.Word
v1 :: Word8
v1 = 300
v2 :: Int8
v2 = -129
v3 :: Int8
v3 = -128
v4 :: Int8
v4 = -127
v5 :: Int8
v5 = -5
v6 :: Int8
v6 = 127
T7895.hs:10:6: Warning: Literal 300 of type Word8 overflows
T7895.hs:13:6: Warning: Literal -129 of type Int8 overflows
test('T7116', normal, run_command, ['$MAKE -s --no-print-directory T7116'])
test('T7895', normal, 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