www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12097] New: Ddoc unittest should generate consistent result with 'ditto' declarations

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12097

           Summary: Ddoc unittest should generate consistent result with
                    'ditto' declarations
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ddoc
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2014-02-07 02:51:15 PST ---
This example code:

  /// declaration
  struct S
  {
      /// method
      void foo() {}
  }

  /// ddoc code
  unittest
  {
      int a = 1;
  }

Will generate following doc:

  struct S;
    declaration

    Examples:
    ddoc code
    int a = 1;

    void foo();
      method

====

However, if you add a 'ditto' declaration immediately after 'S':

  /// declaration
  struct S
  {
      /// method
      void foo() {}
  }

  /// ditto
  void f() {}

  /// ddoc code
  unittest
  {
      int a = 1;
  }

In generated ddoc, 'Examples' section will be moved after the members of S.

  struct S; 
  void f();
    declaration

    void foo();
      method

    Examples:   <--- Moved after S.foo
    ddoc code
    int a = 1;

It should be:

  struct S; 
  void f();
    declaration

    Examples:
    ddoc code
    int a = 1;

    void foo();
      method

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 07 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12097


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2014-02-07 03:13:09 PST ---
https://github.com/D-Programming-Language/dmd/pull/3230

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 07 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12097



--- Comment #2 from github-bugzilla puremagic.com 2014-02-07 07:31:48 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/a91640f7d66bdc3789dd90802620e90dffd833ed
fix Issue 12097 - Ddoc unittest should generate consistent result with 'ditto'
declarations

https://github.com/D-Programming-Language/dmd/commit/4d45128ae9f11502e74638d017e8eb766669164c
Merge pull request #3230 from 9rnsr/fix12097

Issue 12097 - Ddoc unittest should generate consistent result with 'ditto'
declarations

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 07 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12097


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 07 2014