Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Compilers] Generated IL for is check against constant #20642
Steps to Reproduce:
I came to this example by looking at docs for the is keyword. Albeit it explicitly states object.Equals is used, not sure why it's shown as an example. Possibly this should be filed under docs, if it is so by design.
The spec does say
Two errors here: first, it isn't a constant expression, it is a pattern-matching expression.
Second, we do the operand of
This bug report is that we fail to do the first bullet correctly. Reopening.