Don't look up unnecessary return in LastStmt
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 20 Sep 2018 19:02:39 +0000 (20:02 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Sun, 23 Sep 2018 01:45:23 +0000 (02:45 +0100)
commit4bde71df9a32bf6f5ee7d44fbbf79523da4b0a9e
treea629d95f46f0e0c80279168f855b5ac4e36d07e5
parentcad5d0b69bc039b635a6eb0e5c9ed47d7c5a38ed
Don't look up unnecessary return in LastStmt

This fixes Trac #15607. The general pattern is well
established (e.g. see the guard_op binding in rnStmt
of BodyStme), but we weren't using it for LastStmt.
compiler/hsSyn/HsExpr.hs
compiler/rename/RnExpr.hs
testsuite/tests/rename/should_fail/T15607.hs [new file with mode: 0644]
testsuite/tests/rename/should_fail/T15607.stderr [new file with mode: 0644]
testsuite/tests/rename/should_fail/all.T