Cysharp / ConsoleAppFramework

Zero Dependency, Zero Overhead, Zero Reflection, Zero Allocation, AOT Safe CLI Framework powered by C# Source Generator.
MIT License
1.66k stars 95 forks source link

warning CS8625: Cannot convert null literal to non-nullable reference type #120

Closed xPaw closed 5 months ago

xPaw commented 5 months ago

When project does not have nullables enabled, but assigns default or null as default type for strings, CS8625 is triggered because the generated code has #nullable, but the parameter is not string?

        ConsoleApp.Run(args, Test);

        private static void Test(
            bool a1,
            bool a2,
            bool a3,
            bool a4,
            bool a5,
            bool a6,
            bool a7,
            bool a8,
            bool a9,
            bool a10,
            bool a11,
            bool a12,
            bool a13,
            bool a14,
            bool a15,
            bool a16,
            bool a17,
            bool a18,
            bool a19,
            string foo = null)
        {
            Console.WriteLine(foo);
        }
neuecc commented 5 months ago

thanks, disabled warning on 5.2.1.