Skip to content

Commit 0da71d8

Browse files
committed
Good errors for size-changing ops.
1 parent 11dd464 commit 0da71d8

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/MultiDimArrayInstanceBase.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,32 @@ protected int indicesToFlatIndex(ThreadContext tc, long[] indices) {
6262
dimensions.length, indices.length));
6363
}
6464
}
65+
66+
public void push_boxed(ThreadContext tc, SixModelObject value) {
67+
throw ExceptionHandling.dieInternal(tc, "Cannot push onto a fixed dimension array");
68+
}
69+
public void push_native(ThreadContext tc) {
70+
throw ExceptionHandling.dieInternal(tc, "Cannot push onto a fixed dimension array");
71+
}
72+
public SixModelObject pop_boxed(ThreadContext tc) {
73+
throw ExceptionHandling.dieInternal(tc, "Cannot pop a fixed dimension array");
74+
}
75+
public void pop_native(ThreadContext tc) {
76+
throw ExceptionHandling.dieInternal(tc, "Cannot pop a fixed dimension array");
77+
}
78+
public void unshift_boxed(ThreadContext tc, SixModelObject value) {
79+
throw ExceptionHandling.dieInternal(tc, "Cannot unshift onto a fixed dimension array");
80+
}
81+
public void unshift_native(ThreadContext tc) {
82+
throw ExceptionHandling.dieInternal(tc, "Cannot unshift onto a fixed dimension array");
83+
}
84+
public SixModelObject shift_boxed(ThreadContext tc) {
85+
throw ExceptionHandling.dieInternal(tc, "Cannot shift a fixed dimension array");
86+
}
87+
public void shift_native(ThreadContext tc) {
88+
throw ExceptionHandling.dieInternal(tc, "Cannot shift a fixed dimension array");
89+
}
90+
public void splice(ThreadContext tc, SixModelObject from, long offset, long count) {
91+
throw ExceptionHandling.dieInternal(tc, "Cannot splice a fixed dimension array");
92+
}
6593
}

0 commit comments

Comments
 (0)