fix: HasWorldReference.onRemove() should call super.onRemove()#3920
Open
Miiohau wants to merge 6 commits into
Open
fix: HasWorldReference.onRemove() should call super.onRemove()#3920Miiohau wants to merge 6 commits into
Miiohau wants to merge 6 commits into
Conversation
…rentResize) to be consisted with onGameResize added super.onRemove(); to HasWorldReference.onRemove()
spydon
reviewed
May 13, 2026
Member
spydon
left a comment
There was a problem hiding this comment.
Hmm, it's a bit weird to add mustCallSuper to all the empty lifecycle methods in Component since they don't implement anything, but I get the thinking. I'll take that up with the team.
Tests are missing that shows that the bug has been solved (so that we don't have a regression later).
Member
|
@Miiohau can you limit this PR to only the changes in |
…onParentResize) to be consisted with onGameResize
…onParentResize) to be consisted with onGameResize added test
…e()-doesn't-call-super.onRemove()' into fixing-HasWorldReference.onRemove()-doesn't-call-super.onRemove()
Author
|
Reverted the @mustCallSuper changes and added a test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
added @mustCallSuper on Component "lifecycle methods" (including onParentResize) to be consisted with onGameResize
added super.onRemove(); to HasWorldReference.onRemove()
Description
Fixes #3919
Makes HasWorldReference.onRemove() call super.onRemove() and added @mustCallSuper on Component "lifecycle methods" to to help similar bugs to be detected
Checklist
docsand added dartdoc comments with///.examplesordocs.Breaking Change?
Related Issues
Fixes #3919