Area-CompilersBugConcept-Diagnostic Clarityhelp wanted
Métriques du dépôt
- Stars
- (20 414 stars)
- Métriques de merge PR
- (Merge moyen 6j 17h) (256 PRs mergées en 30 j)
Description
Why does the following code given an error during compilation? public class A { }
public class B
{
private static A AF { get; }
public B()
{
AF = new A();
}
}
C# 6.0, .NET 4.5, VS2015 Update 3
Expected Behavior: This code should not give a compiler error
Actual Behavior: error CS0200: Property or indexer 'B.AF' cannot be assigned to -- it is read only