-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Lang] [bug] Fix support property decorator for data_oriented class #3052
Conversation
✔️ Deploy Preview for jovial-fermat-aa59dc ready! 🔨 Explore the source changes: 8381611 🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/615f975c27a9040008574c7b 😎 Browse the preview: https://deploy-preview-3052--jovial-fermat-aa59dc.netlify.app |
@strongoier @ltt1598 can you help me to check, I am not sure if it may cause other problems or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing! This solution looks very promising - just a few nits :-)
tests/python/test_oop.py
Outdated
@property | ||
@ti.kernel | ||
def test(self) -> ti.i32: | ||
return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return 0 | |
return 24 |
tests/python/test_oop.py
Outdated
return 0 | ||
|
||
a = Test() | ||
print(a.test) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print(a.test) | |
assert a.test == 24 |
Let's make it a real test :-)
if is_property: | ||
return ret() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a test case to cover this code path?
Done, also change the |
some ci failed seems the upstream repo not found problem |
/format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx!
Related issue = #3019
Because the @Portery decorator can not use getattribute in this case it will mark as a
porterty class
with fset fset and somehing else.I use a tricky to support it.