-
Notifications
You must be signed in to change notification settings - Fork 1.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
Remove misleading comment and add assertion #trivial #1027
Conversation
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.
Good catch!
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.
Since we're not seeing crashes, 99% chance that this function is only being called with flattened layouts, which would make sense since unflattened layouts are never "applied."
So I think a better fix is to:
- Keep the static cast
- Assert the class is display node
- Update the function documentation to say that you should only call with flattened layouts.
On a second thought, I think @Adlai-Holler is right. These find nodes functions are called with flattened layouts only. |
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.
Revoke my approval to reflect my second thought.
Nooooooooooo! Yeah no, actually I agree - I forgot I had made this PR. It all makes sense I will adjust. |
|
🚫 CI failed with log |
@wiseoldduck Can you rebase please from latest master and update. |
ad1f7b0
to
878ef3d
Compare
@maicki Done-and-done |
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. Thanks!
The comment at line 305 strongly implies this is expected to be a dynamic cast.