-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
4 - In ReviewA fix for the issue is submitted for review.A fix for the issue is submitted for review.Area-CompilersBugTenet-CompatibilityViolation of forwards/backwards compatibility in a design-time piece.Violation of forwards/backwards compatibility in a design-time piece.Urgency-Now
Milestone
Description
Version Used:
Microsoft.Net.Compilers.Toolset v3.4.0-beta1-19456-03
Steps to Reproduce:
- Create a new console app with
class Program
{
static void Main(string[] args)
{
var x = new object();
if (x != default)
{
Console.WriteLine("Hello world");
}
}
}- Reference the 3.4.0 toolset package
<ItemGroup>
<PackageReference Include="Microsoft.Net.Compilers.Toolset"
Version="3.4.0-beta1-19456-03"
PrivateAssets="all"/>
</ItemGroup>- Compile and see the failure
Program.cs(10,17): error CS0019: Operator '!=' cannot be applied to operands of type 'object' and 'default'
This compiles using Microsoft (R) Visual C# Compiler version 3.4.0-beta1-19417-02 (64f75cda) that's shipped with a SDK, but not using Microsoft (R) Visual C# Compiler version 3.4.0-beta1-19456-03 (3c865821)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
4 - In ReviewA fix for the issue is submitted for review.A fix for the issue is submitted for review.Area-CompilersBugTenet-CompatibilityViolation of forwards/backwards compatibility in a design-time piece.Violation of forwards/backwards compatibility in a design-time piece.Urgency-Now
Type
Projects
Status
Active/Investigating