Skip to content

Commit 811fc2e

Browse files
committed
Fix objsequence bug - returns the wrong type when slicing.
1 parent 86ea663 commit 811fc2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vm/src/objsequence.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::objbool;
2-
use super::pyobject::{PyObject, PyObjectKind, PyObjectRef, PyResult};
2+
use super::pyobject::{PyObject, PyObjectKind, PyObjectRef, PyResult, TypeProtocol};
33
use super::vm::VirtualMachine;
44
use std::marker::Sized;
55

@@ -91,7 +91,7 @@ pub fn get_item(
9191
},
9292
ref kind => panic!("sequence get_item called for non-sequence: {:?}", kind),
9393
},
94-
vm.get_type(),
94+
sequence.typ(),
9595
)),
9696
_ => Err(vm.new_type_error(format!(
9797
"TypeError: indexing type {:?} with index {:?} is not supported (yet?)",

0 commit comments

Comments
 (0)