Skip to content

Commit da63807

Browse files
committed
Add missing storage assignment
1 parent 02d54b9 commit da63807

File tree

1 file changed

+2
-2
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/str

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/str/StringBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ PDict doDict(VirtualFrame frame, Object cls, PDict from, Object to, Object z,
831831
HashingStorage destStorage = PDict.createNewStorage(false, hlib.length(srcStorage));
832832
for (HashingStorage.DictEntry entry : hlib.entries(srcStorage)) {
833833
if (PGuards.isInteger(entry.key) || PGuards.isPInt(entry.key)) {
834-
hlib.setItem(destStorage, entry.key, entry.value);
834+
destStorage = hlib.setItem(destStorage, entry.key, entry.value);
835835
} else {
836836
String strKey = cast.cast(entry.key, ErrorMessages.KEYS_IN_TRANSLATE_TABLE_MUST_BE_STRINGS_OR_INTEGERS);
837837
if (strKey.isEmpty()) {
@@ -841,7 +841,7 @@ PDict doDict(VirtualFrame frame, Object cls, PDict from, Object to, Object z,
841841
if (strKey.length() != PString.charCount(codePoint)) {
842842
throw raise(ValueError, ErrorMessages.STRING_KEYS_MUST_BE_LENGHT_1);
843843
}
844-
hlib.setItem(destStorage, codePoint, entry.value);
844+
destStorage = hlib.setItem(destStorage, codePoint, entry.value);
845845
}
846846
}
847847
return factory().createDict(destStorage);

0 commit comments

Comments
 (0)