maca88 / AsyncGenerator

Generating async c# code using Roslyn
MIT License
47 stars 16 forks source link

Support C# 8 nullables #134

Closed hazzik closed 5 years ago

hazzik commented 5 years ago

The <auto-generated> resets the #nullable flag (disables it), so the generator should emit #nullable restore at the top of the generated file (after the /// <auto-generated>) to restore the flag to project's default settings. Otherwise the code could become not compilable.

hazzik commented 5 years ago

@maca88 added the bug label

Not a bug per se.

hazzik commented 5 years ago

Also, this, probably, needs to be controlled by an option, because on older compilers this directive could throw error on build.

maca88 commented 5 years ago

Not a bug per se.

Changed to enhancement.

this, probably, needs to be controlled by an option

135 checks the Nullable tag in csproj. The mentioned PR does not work when using .NET 4.6.1 as the API for checking nullables is not available.