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

Fix document about understanding-null-safety #5088

Closed

Conversation

RyochanUedasan
Copy link

The example code seems to be about "without null safety".

The example seems about without null safety.
@google-cla
Copy link

google-cla bot commented Jul 31, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@atsansone atsansone added the cla: no Contributor has not signed the Contributor License Agreement label Jul 31, 2023
@RyochanUedasan
Copy link
Author

I have just signed the Google CLA!

@RyochanUedasan RyochanUedasan changed the title Fix docs about understanding-null-safety Fix document about understanding-null-safety Jul 31, 2023
Copy link
Member

@parlough parlough left a comment

Choose a reason for hiding this comment

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

Thanks for opening a pull request and signing the CLA!

However, this snippet does appear to be "using null safety" due to the Thing? thing parameter which is marked as nullable which is only possible with null safety enabled.

What about it makes you think it's meant to be an example without null safety?

@parlough parlough removed the cla: no Contributor has not signed the Contributor License Agreement label Jul 31, 2023
@RyochanUedasan
Copy link
Author

@parlough Thanks for your reply.
I initially thought this code was another example of using the null-aware operator before implementing sound null safety, suggesting that ? should be used every time in a method chain, regardless of whether doohickey is non-nullable.
However, as you pointed out, Thing? thing is used here, so this is about using null safety.

I apologize for the mistake!

@RyochanUedasan RyochanUedasan deleted the fix-without-null-safety branch August 1, 2023 05:23
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