Improve the assignment-unpacking code to handle unsure-types and dicts properly, then reimplement visitFor() and visitComprehension() to use assignment code.
Details
- Reviewers
brauch - Commits
- R53:69177a77cbd1: Improved unpacking and iteration.
Added a couple of tests, fixes one previously-XFAIL test.
Doesn't seem to crash.
Diff Detail
- Repository
- R53 KDevelop: Python Support
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Thank you very much for looking into this and cleaning it up, simply the amount of removed code makes this a very welcome patch already :)
I added a few small comments, otherwise this looks good to me. Much appreciated!
duchain/declarationbuilder.cpp | ||
---|---|---|
1232 | I think you shouldn't use this function if you only want to loop over the types. Feel free to add a foreach_unsure_type function or so, or just write out the loop. | |
1236 | probably more readable with an or | |
1237 | make this a qCDebug() with a better message | |
duchain/helpers.cpp | ||
497 | True, good find ;) |
Used loop instead of filterType().
Used or...and instead of ?:
Removed leftover debug text.
Looks good except for the comment below. To master branch please (not 5.0). Thanks again!
duchain/declarationbuilder.cpp | ||
---|---|---|
98 | wait, now you iterate twice over the same thing, once with the size and once with the foreach, no? |