Fix renamer panic
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 24 Jun 2016 07:59:20 +0000 (08:59 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 24 Jun 2016 10:04:27 +0000 (11:04 +0100)
commit393928db9fc35ef8bdeb241c051224a6c4bdf749
treefc988d60d6d39c6b2c956164adf47b53c81b4337
parentc871ce4903312402fc7f90089f61977c420e2c60
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).
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