Fixed broken assignment to dictionary using integer key

The case

$dict[$key]: value

for integer $key was not addressed in LHS expression logic.
As a result no changes were made to $dict and no error was raised.

Change-Id: I969dab5f0d32312cf52490945934557c32f22dde
Closes-Bug: #1515612
This commit is contained in:
Stan Lagun 2015-11-14 21:54:37 +03:00
parent 1f5c70b478
commit 67c9140a11
1 changed files with 2 additions and 0 deletions

View File

@ -107,6 +107,8 @@ class LhsExpression(object):
src = src_property.get()
if utils.is_sequence(src):
src_property.set(src[:index] + (value,) + src[index + 1:])
elif isinstance(src, utils.MappingType):
attribution(src_property, index).set(value)
if isinstance(index, int):
return LhsExpression.Property(