Closed chuckjaz closed 2 years ago
The was originally found in Compose: https://issuetracker.google.com/issues/193433239
The issue appears to me to be centered around this line,
It inverts the other
and this
in a way that causes the old values to be given preference to new values. If this code executes it appears to be in danger of producing the wrong value. The fix for this is not obvious to me. I couldn't think of something that wasn't brutally direct .
I created a candidate fix in #115. This seems to work when I test it in the Compose local copy of this code.
@chuckjaz do you need an immediate release with the fix?
No. We use a renamed copy of this code because it is not stable. A fix that you approve of would be sufficient then I will cherry-pick the change into our sources.
When the #116 lands I will cherry-pick the result into our sources.
Understood. Thank you for the bug report, by the way.
It was @igordmn's original report. I just narrowed it down a bit further.
Consider the following code:
Expected
n[99] = 99
Received
n[99] = 1
Changing the
putAll
call above toputAll(e)
produces the expected result.