Use vm.invoke instead of calling __call__

This commit is contained in:
Jeong YunWon
2020-01-26 19:30:58 +09:00
parent eea157c2f0
commit bebfb67842

View File

@@ -957,9 +957,8 @@ pub fn builtin_build_class_(
function.invoke_with_scope(vec![].into(), &scope, vm)?;
let class = vm.call_method(
let class = vm.invoke(
metaclass.as_object(),
"__call__",
vec![name_obj, bases, namespace.into_object()],
)?;
cells.set_item("__class__", class.clone(), vm)?;