Skip to content

fix ?? fallback being ignored in assignments - #32

Open
Villezen wants to merge 1 commit into
CodenameCrew:codename-devfrom
Villezen:fix-null-coalescing
Open

Villezen wants to merge 1 commit into
CodenameCrew:codename-devfrom
Villezen:fix-null-coalescing

Conversation

@Villezen

Copy link
Copy Markdown

a = b ?? c gets read as (a = b) ?? c, so if b is null then a becomes null instead of c

This happens because ?? was in a group which came after the = group, so = always got checked first

This PR moves ?? to its own group between || and =

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.

1 participant