diff options
author | Rupert Horlick <ruperthorlick@gmail.com> | 2017-03-06 13:43:34 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-03-06 17:23:01 -0500 |
commit | 3fdabe9873e311571f614d455d1b16bc3f4fdc0f (patch) | |
tree | 4ea10e682a014f677c86beb02d7e63dedcfb9540 /testsuite/tests/deSugar | |
parent | 016b10c50e365ca62a9baffa1c590f4efa8db409 (diff) | |
download | haskell-3fdabe9873e311571f614d455d1b16bc3f4fdc0f.tar.gz |
Changed OverLit warnings to work with negative literals (#13257)
Test Plan: Validate, check generated warnings
Reviewers: austin, bgamari, dfeuer
Reviewed By: bgamari, dfeuer
Subscribers: dfeuer, thomie
Differential Revision: https://phabricator.haskell.org/D3281
Diffstat (limited to 'testsuite/tests/deSugar')
-rw-r--r-- | testsuite/tests/deSugar/should_compile/T13257.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/deSugar/should_compile/T13257.stderr | 3 | ||||
-rw-r--r-- | testsuite/tests/deSugar/should_compile/all.T | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_compile/T13257.hs b/testsuite/tests/deSugar/should_compile/T13257.hs new file mode 100644 index 0000000000..b9188dfe3b --- /dev/null +++ b/testsuite/tests/deSugar/should_compile/T13257.hs @@ -0,0 +1,6 @@ +module T13257 where + + import Data.Int + + int8 = -128 :: Int8 + word = -1 :: Word diff --git a/testsuite/tests/deSugar/should_compile/T13257.stderr b/testsuite/tests/deSugar/should_compile/T13257.stderr new file mode 100644 index 0000000000..93412f1d47 --- /dev/null +++ b/testsuite/tests/deSugar/should_compile/T13257.stderr @@ -0,0 +1,3 @@ + +T13257.hs:6:11: warning: [-Woverflowed-literals (in -Wdefault)] + Literal -1 is out of the Word range 0..18446744073709551615 diff --git a/testsuite/tests/deSugar/should_compile/all.T b/testsuite/tests/deSugar/should_compile/all.T index 7694fb9de7..7a39b1eed7 100644 --- a/testsuite/tests/deSugar/should_compile/all.T +++ b/testsuite/tests/deSugar/should_compile/all.T @@ -97,3 +97,4 @@ test('T12950', normal, compile, ['']) test('T13043', normal, compile, ['']) test('T13215', normal, compile, ['']) test('T13290', normal, compile, ['']) +test('T13257', normal, compile, ['']) |