Skip to content
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

bugfix(4.0): reset KtObject's initConfig after checking if need bind #426

Merged
merged 1 commit into from
Jan 16, 2023

Conversation

piiertho
Copy link
Member

No description provided.

@piiertho piiertho added bug Something isn't working GD4 labels Jan 15, 2023
@piiertho piiertho requested review from chippmann and CedNaru January 15, 2023 17:14
@piiertho piiertho self-assigned this Jan 15, 2023
Copy link
Member

@CedNaru CedNaru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to avoid any other mistakes in case we modify init() again, I would move the call to reset to the end of the instantiateWith() method.

@CedNaru
Copy link
Member

CedNaru commented Jan 16, 2023

Okay forget what I said, I totally forgot why we reset the config here and not later. It's to deal with nested constructions of objects.
If your Kotlin script init{} method also creates other objects, the config has to be reset otherwise they will take the wrong path in the init of KtObject.

@CedNaru CedNaru self-requested a review January 16, 2023 12:38
@piiertho piiertho merged commit 27ea26e into 4.0-adaptation Jan 16, 2023
@piiertho piiertho deleted the bugfix/4.0/bind-ktobject-when-needed branch January 16, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants