Skip to content

Commit 5b43016

Browse files
committed
we're only insertable if it doesn't exist, yet
1 parent 928c032 commit 5b43016

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/interop/PythonMessageResolution.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -667,12 +667,12 @@ public int access(Object object, Object fieldName) {
667667
}
668668
}
669669

670-
if (!isImmutable.execute(owner)) {
671-
info |= KeyInfo.REMOVABLE;
672-
info |= KeyInfo.MODIFIABLE;
673-
}
674-
675-
if (!isImmutable.execute(object)) {
670+
if (attr != PNone.NO_VALUE) {
671+
if (!isImmutable.execute(owner)) {
672+
info |= KeyInfo.REMOVABLE;
673+
info |= KeyInfo.MODIFIABLE;
674+
}
675+
} else if (!isImmutable.execute(object)) {
676676
info |= KeyInfo.INSERTABLE;
677677
}
678678

0 commit comments

Comments
 (0)