From c2b7a3d9f6ad946a2cb2773e96a377cc2216cb5b Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Thu, 21 Apr 2016 14:34:07 +0100 Subject: Avoid double error on out-of-scope identifier Trac #11941 demonstrated a case where an out-of-scope error also gave rise to a (bogus and confusing) stage restriction message. It's caused by the fact that out-of-scope errors do not stop renaming, but rather return an "unbound name". We need to detect this in the stage-restriction test to avoid the double error. Easy fix. --- testsuite/tests/th/T11941.stderr | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 testsuite/tests/th/T11941.stderr (limited to 'testsuite/tests/th/T11941.stderr') diff --git a/testsuite/tests/th/T11941.stderr b/testsuite/tests/th/T11941.stderr new file mode 100644 index 0000000000..4508ed3557 --- /dev/null +++ b/testsuite/tests/th/T11941.stderr @@ -0,0 +1,6 @@ + +T11941.hs:7:30: error: + Not in scope: ‘getFrst’ + Perhaps you meant one of these: + ‘getFirst’ (imported from Data.Monoid), + ‘getLast’ (imported from Data.Monoid) -- cgit v1.2.1