Skip to content

Commit 381c217

Browse files
committed
Fix using SetNewLenNode on empty storage
1 parent 5c9d9ff commit 381c217

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/common/SequenceStorageNodes.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3320,6 +3320,11 @@ static void doBasic(ArrayBasedSequenceStorage s, int len) {
33203320
s.setNewLength(len);
33213321
}
33223322

3323+
@Specialization
3324+
static void doEmpty(@SuppressWarnings("unused") EmptySequenceStorage s, int len) {
3325+
assert len == 0;
3326+
}
3327+
33233328
@Specialization
33243329
static void doNative(NativeSequenceStorage s, int len,
33253330
@Cached(inline = false) SetNativeLenNode setLen) {

0 commit comments

Comments
 (0)