Skip to content

Conversation

@vlada-shubina
Copy link
Member

Problem:

//given 
Token? token = null;
if (token == default || token == null)
{
    //leads to null ref exception
}

Added check for null in Token operator overload.
Workaround: use token is null instead.

@vlada-shubina vlada-shubina changed the title Fixed null reference exception in Token operator overload Fixed null reference exception in Token operator overload Sep 5, 2022
@KalleOlaviNiemitalo
Copy link

KalleOlaviNiemitalo commented Sep 5, 2022

Fixes #1797, thus competes with #1802

@jonsequitur jonsequitur merged commit 1d98a75 into dotnet:main Sep 7, 2022
@jonsequitur
Copy link
Contributor

jonsequitur commented Sep 7, 2022

Thanks, @vlada-shubina!

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.

3 participants