-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-CompilersBugFeature - RecordsRecordsRecordsResolution-FixedThe bug has been fixed and/or the requested behavior has been implementedThe bug has been fixed and/or the requested behavior has been implemented
Description
data class C(int x)
{
static int y = 123;
}
Observed:
warning CS1717: Assignment made to same variable; did you mean to assign something else?
.method public hidebysig specialname rtspecialname
instance void .ctor (
class C ''
) cil managed
{
// Method begins at RVA 0x20a8
// Code size 30 (0x1e)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [System.Private.CoreLib]System.Object::.ctor()
IL_0006: nop
IL_0007: ldarg.0
IL_0008: ldarg.1
IL_0009: ldfld int32 C::'<x>k__BackingField'
IL_000e: stfld int32 C::'<x>k__BackingField'
IL_0013: ldsfld int32 C::y
IL_0018: stsfld int32 C::y
IL_001d: ret
} // end of method C::.ctor
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-CompilersBugFeature - RecordsRecordsRecordsResolution-FixedThe bug has been fixed and/or the requested behavior has been implementedThe bug has been fixed and/or the requested behavior has been implemented