Fix renamer panic
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 24 Jun 2016 07:59:20 +0000 (08:59 +0100)
committerBen Gamari <ben@smart-cactus.org>
Mon, 25 Jul 2016 15:06:06 +0000 (17:06 +0200)
commit8736625f143d55616e76ff660d476ce4a9cdb2d9
tree683a2f76a3f726e1e4144c16526a7a197b9d7fbb
parent2a09e6edca54ce8788aba724f0a4156876e6ded0
Fix renamer panic

This patch fixes Trac #12216 and #12127.  The 'combine' function
in 'imp_occ_env' in RnNames.filterImports checked for an empty
field-selector list, which was (a) unnecessary and (b) wrong.

I've elaborated the comments.

This does NOT fix #11959 which is related but not the same
(it concerns bundling of pattern synonyms).

(cherry picked from commit 393928db9fc35ef8bdeb241c051224a6c4bdf749)
compiler/rename/RnNames.hs
testsuite/tests/rename/should_compile/T12127.hs [new file with mode: 0644]
testsuite/tests/rename/should_compile/T12127a.hs [new file with mode: 0644]
testsuite/tests/rename/should_compile/all.T