Skip to content

Commit 58658a1

Browse files
committed
disable warning about null reference on nullable disabled
1 parent ad07741 commit 58658a1

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

sandbox/GeneratorSandbox/GeneratorSandbox.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
7-
<Nullable>enable</Nullable>
7+
<Nullable>disable</Nullable>
88
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
99
<NoWarn>1701;1702;CS8321</NoWarn>
1010
<IsPackable>false</IsPackable>

sandbox/GeneratorSandbox/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public void Handle(
3131
bool a16,
3232
bool a17,
3333
bool a18,
34-
bool a19
34+
bool a19,
35+
string foo = null
3536
)
3637
{
3738
Console.Write("ok");

src/ConsoleAppFramework/ConsoleAppGenerator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ static void EmitConsoleAppTemplateSource(IncrementalGeneratorPostInitializationC
556556
#pragma warning disable CS9074 // The 'scoped' modifier of parameter doesn't match overridden or implemented member
557557
#pragma warning disable CA1050 // Declare types in namespaces.
558558
#pragma warning disable CS1998
559+
#pragma warning disable CS8625
559560
560561
namespace ConsoleAppFramework;
561562

0 commit comments

Comments
 (0)