From 53d837abe2a9878481c2cd70c7e830bf1c827a60 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Fri, 31 May 2024 09:26:23 -0400 Subject: [PATCH] fix preprocessor symbols and test messages --- standard/types.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/standard/types.md b/standard/types.md index ef9378462..863627575 100644 --- a/standard/types.md +++ b/standard/types.md @@ -789,9 +789,10 @@ When the nullable context is annotations: > *Example*: > -> +> > ```csharp -> #nullable annotations +> #nullable disable warnings +> #nullable enable annotations > string? s1 = null; // OK; ? makes s2 nullable > string s2 = null; // OK; warnings are disabled > s2 = null; // OK; warnings are disabled @@ -816,9 +817,10 @@ Some warnings are generated when the nullable context is set to *warnings*. (Exa > *Example*: > -> +> > ```csharp -> #nullable warnings +> #nullable disable annotations +> #nullable enable warnings > string? s1 = null; // OK; ? makes s2 nullable > string s2 = null; // OK; null-state of s2 is "maybe null" > s2 = null; // OK; null-state of s2 is "maybe null" @@ -843,9 +845,9 @@ When the nullable context is enable: > *Example*: > -> +> > ```csharp -> #nullable warnings +> #nullable enable > string? s1 = null; // OK; ? makes s2 nullable > string s2 = "text"; // OK; null-state of s2 is "not null" > s2 = null; // OK; null-state of s2 is "maybe null"