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

Nullability: conversion behavior #1242

Open
wants to merge 4 commits into
base: draft-v8
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove trailing whitespace
  • Loading branch information
jnm2 committed Jan 1, 2025
commit 6de3cd515306c589ebf80c927980c03235222890
6 changes: 3 additions & 3 deletions standard/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -925,10 +925,10 @@ A compiler can update the null state of a variable as part of its analysis.
> int length = p.Length; // Warning: p is maybe null
>
> string s = p; // No warning. p is not null
>
>
> if (s != null)
> {
> int l2 = s.Length; // No warning. s is not null
> int l2 = s.Length; // No warning. s is not null
> }
> int l3 = s.Length; // Warning. s is maybe null
> }
Expand Down Expand Up @@ -1031,7 +1031,7 @@ A compiler may use any expression that dereferences a variable, property, or eve
> public class C
> {
> private C? child;
>
>
> public void M()
> {
> _ = child.child.child; // Warning. Dereference possible null value
Expand Down