forked from facebook/hhvm
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] Folding concats needs to preserve conversion to string
Summary: The code to fold concats was checking the wrong condition (at one point, this condition would have worked, but it assumed that nothing touched the expected type on the node being replaced - this was too fragile, and is no longer true). Instead, we check that the expected type on the concat is String - and if not we insert a string cast. There was a similar issue with $x + 0 and $x * 1, but those were sufficiently conservative that I couldnt actually reproduce a problem. The new checks should be both correct, and less conservative. Test Plan: fast_tests slow_tests Reviewers: qigao, myang, andrewparoski Reviewed By: myang CC: ps, mwilliams, myang Differential Revision: 340359 Task ID: 752902
- Loading branch information
mwilliams
authored and
macvicar
committed
Oct 18, 2011
1 parent
33fb07e
commit 6588637
Showing
2 changed files
with
38 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters