[Mono-bugs] [Bug 697296] New: gmcs generates incorrect //member/@name value for arrays of arrays

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue May 31 16:33:49 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=697296

https://bugzilla.novell.com/show_bug.cgi?id=697296#c0


           Summary: gmcs generates incorrect //member/@name value for
                    arrays of arrays
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: x86-64
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: msafar at novell.com
        ReportedBy: jonpryor at vt.edu
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7)
AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.71 Safari/534.24

gmcs generates an incorrect XML documentation declaration for methods
containing arrays of arrays. This is a regression from 2.10.2 (though master
fixes another bug in 2.10.2).

Reproducible: Always

Steps to Reproduce:
1. Save the following code as d.cs:

  // Compile with: csc /t:library /doc:d.xml d.cs
  namespace Demo {
    public class Example {
      /// <remarks>M:Demo.Example.M(double[0:,0:,0:][])</remarks>
      public static void M(double[][,,,] value)
      {
      }
    }
  }

2. Compile and generate XML documentation:
  $ gmcs /t:library /doc:d.xml d.cs

Actual Results:  
d.xml contains the contents:


    <?xml version="1.0"?>
    <doc>
        <assembly>
            <name>d</name>
        </assembly>
        <members>
            <member name="M:Demo.Example.M(System.Double[][0:,0:,0:,0:])">
                <remarks>M:Demo.Example.M(double[0:,0:,0:][])</remarks>
            </member>
        </members>
    </doc>

Note that //members/member[1]/@name doesn't match //members/member[1]/remarks;
specifically, /members/member[1]/@name is
"M:Demo.Example.M(System.Double[][0:,0:,0:,0:])" while it should be
"M:Demo.Example.M(double[0:,0:,0:][])". (The problem is the array ordering).

For comparison purposes, using gmcs from Mono 2.10.2 results in a cref of
"M:Demo.Example.M(System.Double[,,,][])" which is wrong (it doesn't contain the
"0:" values), but does have the arrays in the correct order.

Expected Results:  
For comparison purposes, here is the output from .NET:


    <?xml version="1.0"?>
    <doc>
        <assembly>
            <name>test</name>
        </assembly>
        <members>
            <member name="M:Demo.Example.M(System.Double[0:,0:,0:,0:][])">
                <remarks>M:Demo.Example.M(double[0:,0:,0:][])</remarks>
            </member>
        </members>
    </doc>

Note that with .NET the <remarks/> value matches the @name value, as expected.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list