mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
fix a bug of property
This commit is contained in:
parent
6e9dd9516b
commit
1ab175006d
@ -260,7 +260,7 @@ bool pk_loadmethod(py_StackRef self, py_Name name) {
|
|||||||
self[0] = *py_getslot(cls_var, 0);
|
self[0] = *py_getslot(cls_var, 0);
|
||||||
self[1] = ti->self;
|
self[1] = ti->self;
|
||||||
break;
|
break;
|
||||||
default: c11__unreachable();
|
default: return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -170,3 +170,13 @@ for x in xs:
|
|||||||
|
|
||||||
assert res == list(range(101))
|
assert res == list(range(101))
|
||||||
assert xs == res
|
assert xs == res
|
||||||
|
|
||||||
|
# call property
|
||||||
|
from vmath import vec2
|
||||||
|
|
||||||
|
a = vec2(1, 2)
|
||||||
|
try:
|
||||||
|
x = a.x()
|
||||||
|
exit(1)
|
||||||
|
except TypeError:
|
||||||
|
pass
|
Loading…
x
Reference in New Issue
Block a user