We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cfc927 commit b4e4cfdCopy full SHA for b4e4cfd
src/vm/jvm/runtime/org/perl6/nqp/truffle/runtime/NQPList.java
@@ -27,7 +27,15 @@ public Object atpos(long pos) {
27
}
28
29
public Object bindpos(long pos, Object value) {
30
- return contents.set((int)pos, value);
+ if (pos >= contents.size()) {
31
+ for (int i = contents.size(); i < pos; i++) {
32
+ contents.add(NQPNull.SINGLETON);
33
+ }
34
+ contents.add(value);
35
+ return value;
36
+ } else {
37
+ return contents.set((int)pos, value);
38
39
40
41
public int elems() {
0 commit comments