Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missclassifying public field when using coma to initialize several at once in C#. #8718

Closed
AleixFerre opened this issue Aug 14, 2021 · 5 comments
Labels

Comments

@AleixFerre
Copy link

Describe the bug
I have two public int fields initialized in this class. Then I have several private ones. The program missunderstand the coma separated field and place it into the private section.

Expected behavior
Obviously the second int would need to be public aswell.

Screenshots
image

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[RequireComponent(typeof(Collider), typeof(TurretStats))]
public class BaseRegenerator : MonoBehaviour {

    public int HPRegen, MPRegen; //< Here it happens!

    private List<PlayerStats> playersInside = new List<PlayerStats>();
    private float lastRegenTime;
    private Collider _collider;
    private TurretStats stats;
   
    // ...

Version
Windows 10 - 64bit

$ doxygen -v
1.9.1 (ef9b20ac7f8a8621fcfc299f8bd0b80422390f4b)

Additional context
This code is from a game I'm developing in Unity using C#.

@albert-github
Copy link
Collaborator

When setting:

EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES

I can reproduce the problem.

To be sure that we speak about the same:

  • Can you please attach a, small, self contained example (source+configuration file in a tar or zip) that allows us to reproduce the problem? Please don't add external links as they might not be persistent.

@AleixFerre
Copy link
Author

Sure, this is my output for ./proj/html/class_example.html

image

The Doxyfile is the autogenerated with doxygen -g Doxyfile, the only think I changed is

EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES

All the code is (the only file i have is ./proj/test.cs)

public class Example {
    public int a, b;
    private float c;
}

albert-github added a commit to albert-github/doxygen that referenced this issue Aug 16, 2021
…nitialize several at once in C#.

The protection attribute holds for all variables.
@albert-github
Copy link
Collaborator

I've just pushed a proposed patch, pull request #8720.

doxygen added a commit that referenced this issue Aug 16, 2021
issue #8718 Miss-classifying public field when using coma to initialize several at once in C#.
@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 16, 2021
@albert-github
Copy link
Collaborator

Code has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release).

@doxygen
Copy link
Owner

doxygen commented Aug 18, 2021

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.2.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 18, 2021
@doxygen doxygen closed this as completed Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants