Bug 35087

Summary: Incorrect CS1587 warning for comment on C#6 auto-property initializer
Product: [Mono] Compilers Reporter: Alexander Köplinger [MSFT] <alkpli>
Component: C#Assignee: Marek Safar <masafa>
Severity: normal CC: mono-bugs+mono
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Tags: Is this bug a regression?: ---
Last known good build:

Description Alexander Köplinger [MSFT] 2015-10-20 08:52:25 UTC
Repro code:

> using System.Collections.Generic;
> /// <summary>The Test</summary>
> public class Test
> {
>    /// <summary>The Foo</summary>
>    protected Dictionary<string, object> Foo { get; set; } = new Dictionary<string, object>();
>    /// <summary>Tests the Foo</summary>
>    protected bool TestFoo { get; set; }
> }


> mcs -t:library -doc:test.xml test.cs


> test.cs(9,3): warning CS1587: XML comment is not placed on a valid language element
> test.cs(10,19): warning CS1591: Missing XML comment for publicly visible type or member `Test.TestFoo'
> Compilation succeeded - 2 warning(s)

The line in the first warning message doesn't make sense, it seems to be confused by the C#6 auto-property initializer above.

This breaks when warning-as-errors in turned on (I found this in xunit).

Reproduces in 4.0, 4.2 and master.
Comment 1 Marek Safar 2015-10-20 12:39:43 UTC
Fixed in master