EnumTheraotExtensions.HasFlag doesn't handle zero value
Closed this issue · 0 comments
NN--- commented
[Flags]
public enum X { A = 1 }
public class Program
{
public static void Main()
{
System.Console.WriteLine(X.A.HasFlag((X)0)); // Expected to be True but False in Theraot
}
}
Another sample:
using System;
[Flags]
public enum MyFlags
{
Zero = 0x0,
A = 0x1,
}
public class Program
{
public static void Main()
{
Console.WriteLine(MyFlags.A.HasFlag(MyFlags.Zero)); // Expected to be True but False in Theraot
}
}