Make the shape interpreter actually advance past fixed length vectors. Closes #2613.
This commit is contained in:
parent
210db7d8d4
commit
999ab5418a
@ -923,7 +923,9 @@ public:
|
||||
void walk_fixedvec1(uint16_t n_elts, bool is_pod) {
|
||||
size_align sa = size_of::get(*this);
|
||||
ALIGN_TO(sa.alignment);
|
||||
U next_dp = dp + (n_elts * sa.size);
|
||||
static_cast<T *>(this)->walk_fixedvec2(n_elts, sa.size, is_pod);
|
||||
dp = next_dp;
|
||||
}
|
||||
|
||||
void walk_box1() { DATA_SIMPLE(void *, walk_box2()); }
|
||||
|
6
src/test/run-pass/fixed_length_vec_glue.rs
Normal file
6
src/test/run-pass/fixed_length_vec_glue.rs
Normal file
@ -0,0 +1,6 @@
|
||||
fn main() {
|
||||
let arr = [1,2,3]/3;
|
||||
let struct = {a: 13u8, b: arr, c: 42};
|
||||
let s = sys::log_str(struct);
|
||||
assert(s == "(13, [1, 2, 3]/3, 42)");
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user