This commit is contained in:
blueloveTH 2023-05-09 14:30:08 +08:00
parent 515321a0af
commit 93ef42e1d0
2 changed files with 9 additions and 1 deletions

View File

@ -286,7 +286,7 @@ public:
template<typename T, typename __T>
void bind_default_constructor(__T&& type) {
bind_constructor<1>(std::forward<__T>(type), [](VM* vm, ArgsView args){
bind_constructor<-1>(std::forward<__T>(type), [](VM* vm, ArgsView args){
Type t = OBJ_GET(Type, args[0]);
return vm->heap.gcnew<T>(t, T());
});

View File

@ -91,3 +91,11 @@ class B(A):
# assert B.a == 1 ...bug here
assert B.b == 3
assert B.c == 4
from c import void_p
class A(void_p):
pass
a = A()
assert repr(a) == '<void* at (nil)>'