diff options
author | Kevin Buhr <buhr@asaurus.net> | 2019-05-07 11:01:14 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-07-11 17:46:19 -0400 |
commit | cb5271ac9a6686d065de63d1dde80e713830e21b (patch) | |
tree | c21d550a4a1c91ebde978671c599b66122f6d74f /testsuite/tests/rename/should_fail | |
parent | d2e290d3280841647354ddf5ca9abdd974bce0d5 (diff) | |
download | haskell-cb5271ac9a6686d065de63d1dde80e713830e21b.tar.gz |
Add regression test for old panic on inlining undeclared identifier (#495)
Diffstat (limited to 'testsuite/tests/rename/should_fail')
-rw-r--r-- | testsuite/tests/rename/should_fail/T495.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T495.stderr | 7 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/all.T | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/T495.hs b/testsuite/tests/rename/should_fail/T495.hs new file mode 100644 index 0000000000..7fa871dfdb --- /dev/null +++ b/testsuite/tests/rename/should_fail/T495.hs @@ -0,0 +1,7 @@ +-- Regression test for #495 + +-- inlining an undeclared identifier should give error, not panic... +{-# INLINE blarg #-} + +-- even if the identifier is imported in the Prelude... +{-# INLINE lookup #-} diff --git a/testsuite/tests/rename/should_fail/T495.stderr b/testsuite/tests/rename/should_fail/T495.stderr new file mode 100644 index 0000000000..0581807d70 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T495.stderr @@ -0,0 +1,7 @@ + +T495.hs:4:12: error: + The INLINE pragma for ‘blarg’ lacks an accompanying binding + +T495.hs:7:12: error: + The INLINE pragma for ‘lookup’ lacks an accompanying binding + (The INLINE pragma must be given where ‘lookup’ is declared) diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index 35a3174000..c36c4cfcf9 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -60,6 +60,7 @@ test('rnfail056', normal, compile_fail, ['']) test('rnfail057', normal, compile_fail, ['']) test('rn_dup', normal, compile_fail, ['']) +test('T495', normal, compile_fail, ['']) test('T2490', normal, compile_fail, ['']) test('T2901', normal, compile_fail, ['']) test('T2723', normal, compile, ['']) # Warnings only |