title: Strange behaviour when casting Enum
body: <p>I have an enum:</p>
  
  <pre><code>public enum Blah
  {
      Value  = 0,
      Value2 = 1
  }
  </code></pre>
  
  <p>And the following code:</p>
  
  <pre><code>void Main()
  {
      Blah? a = Blah.Value;
      bool val = (a == (int) Blah.Value);  // compiles
           val = (a == (int) Blah.Value2); // doesn't compile
  }
  </code></pre>
  
  <p>As you can see from the comments above, the first line compiles but the second doesn't.</p>
  
  <p>Can anyone explain it? I checked the <em>IL Interpreter</em> and can't really see why:</p>
  
  <p><a href="https://i.stack.imgur.com/ceV29.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ceV29.png" alt="enter image description here"></a></p>