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

ValueGetter code simplification #9

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

petrnymsa
Copy link
Contributor

Generated code for ValueGetter can be simplified.

From

x != null ? x() : this.x

to

x?.call() ?? this.x

@petrnymsa petrnymsa changed the title Use call instead of null comparison ValueGetter code simplification Oct 25, 2023
@ricardoemerson
Copy link
Owner

Thanks, I will check

@ricardoemerson ricardoemerson merged commit bec743f into ricardoemerson:main Nov 3, 2023
@ricardoemerson
Copy link
Owner

Extension updated, Thanks for contribution, 😉👍

@petrnymsa
Copy link
Contributor Author

@ricardoemerson This has to be reverted. Sorry for introducing bug.

x?.call() ?? this.x

if ValueGetter returns null, it will fallback to this.x, which is not what we want.

@petrnymsa
Copy link
Contributor Author

@ricardoemerson Can you look at this, please? It is kinda blocker. Thanks in advance.

@petrnymsa petrnymsa mentioned this pull request Nov 22, 2023
@petrnymsa
Copy link
Contributor Author

Opened new PR #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants