After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 389656 - Enumerations having some identical member names are confused.
Enumerations having some identical member names are confused.
Status: RESOLVED OBSOLETE
Product: doxygen
Classification: Other
Component: general
1.5.1
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
[moved_to_github]
Depends on:
Blocks: 173045
 
 
Reported: 2006-12-26 05:34 UTC by qed
Modified: 2018-07-30 10:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
D testcase (337 bytes, text/plain)
2007-09-27 14:19 UTC, Stewart Gordon
Details

Description qed 2006-12-26 05:34:40 UTC
Please describe the problem:
This applies to Csharp (C#) code documentation of enumerations (enum). When two enumerations share some members having the same name, documentation for both members appears with both enumeration documentations.

PLEASE SEE SIMPLE EXAMPLE IN OTHER INFORMATION BELOW.

Steps to reproduce:
1. Create a C# program with two global enumerations (not nested in a class, but can be in a namespace) and nothing else.
2. Make some of the members of the enumerations have the same names.
3. Run doxygen with enough flags set so you get enums documented.


Actual results:
You get duplicate entries in the documentation. One for the member that is actually in the enumeration, another for the member with the same name in the other enumeration.

Expected results:
Only members of an enumeration should be documented with the enumeration. Documentation should not include members of other enumerations.

Does this happen every time?
Yes

Other information:
-----------------------------------------------
This is the sample program
-----------------------------------------------
using System;

/// <summary>
/// This is an enumeration.
/// </summary>
public enum List1
{
  Folder,           //!< This is item 1 in enumeration 1
  Compilation,      //!< This is item 2 in enumeration 1
  Directory,        //!< This is item 3 in enumeration 1
  Label             //!< This is item 4 in enumeration 1
}

/// <summary>
/// This is another enumeration.
/// </summary>
public enum List2
{
  Horse,            //!< This is item 1 in enumeration 2
  Compilation,      //!< This is item 2 in enumeration 2
  Dog,              //!< This is item 3 in enumeration 2
  Label,            //!< This is item 4 in enumeration 2
  Cat               //!< This is item 5 in enumeration 2
}

---------------------------------------
This is some of the documentation (a CHM file)
---------------------------------------
enum List1  

This is an enumeration. 


Enumerator: 
Folder  This is item 1 in enumeration 1.  
Compilation  This is item 2 in enumeration 1.  
Compilation  This is item 2 in enumeration 2.  
Directory  This is item 3 in enumeration 1.  
Label  This is item 4 in enumeration 1.  
Label  This is item 4 in enumeration 2.  

Definition at line 6 of file sample.cs. 


enum List2  

This is another enumeration. 


Enumerator: 
Horse  This is item 1 in enumeration 2.  
Compilation  This is item 2 in enumeration 1.  
Compilation  This is item 2 in enumeration 2.  
Dog  This is item 3 in enumeration 2.  
Label  This is item 4 in enumeration 1.  
Label  This is item 4 in enumeration 2.  
Cat  This is item 5 in enumeration 2.  

Definition at line 17 of file sample.cs.
Comment 1 Dimitri van Heesch 2006-12-28 22:59:57 UTC
Confirmed. This is due to the difference in the way enum values are handled in C# and C++. In C++ enum values are accessible outside the enums scope, where-as in C# they require explicit qualification. I'll add some specific treatment for C# in the next CVS update, so the output is at least correct in both cases.
Comment 2 Stewart Gordon 2007-01-31 22:46:14 UTC
The exact same problem occurs in D.

Will the solution you have in mind break documentation in languages other than C# and D?  Otherwise, I don't see any need for language-specific treatment rather than putting it into the basic algorithm.
Comment 3 Dimitri van Heesch 2007-04-05 20:10:18 UTC
This bug was marked "assigned" by me some time ago, which means it should be
fixed in version 1.5.2 and is hereby marked as such. I would kindly request you
to check if this version indeed fixes the problem and reopen the bug report
should you still see the same problem.
Comment 4 Stewart Gordon 2007-07-27 18:32:23 UTC
The bug is still there.  Please reopen.
Comment 5 Stewart Gordon 2007-09-27 14:19:37 UTC
Created attachment 96289 [details]
D testcase
Comment 6 albert 2013-05-18 14:39:38 UTC
Problem is in 1.8.3.1 (20130512 / svn 848) still present for the language D; for c# the problem is not present anymore.
Comment 7 André Klapper 2018-07-30 10:24:32 UTC
As discussed in https://github.com/doxygen/doxygen/pull/734 , Doxygen has moved its issue tracking to 

   https://github.com/doxygen/doxygen/issues

All Doxygen tickets in GNOME Bugzilla have been migrated to Github. You can subscribe and participate in the new ticket in Github. You can find the corresponding Github ticket by searching for its Bugzilla ID (number) in Github.

Hence I am closing this GNOME Bugzilla ticket.
Please use the corresponding ticket in Github instead. Thanks a lot!