https://bugs.kde.org/show_bug.cgi?id=375224

            Bug ID: 375224
           Summary: C# importer crashes on enums when they're used before
                    being defined
           Product: umbrello
           Version: unspecified
          Platform: unspecified
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: umbrello-de...@kde.org
          Reporter: badpoint...@gmail.com
  Target Milestone: ---

There's no concept of forward declarations in C#, so it's allowed to use enum
types before they're defined but when I try to import this C# code,
umbrello crashes.

namespace TestNamespace
{
    public class TestClass
    {
        void Dispatch(COMMAND com);
    }

    public enum COMMAND
    {
        OPTION1,
        OPTION2,
        OPTION3
    }
}

If I rearange the code like this, it works fine

namespace TestNamespace
{
    public enum COMMAND
    {
        OPTION1,
        OPTION2,
        OPTION3
    }

    public class TestClass
    {
        void Dispatch(COMMAND com);
    }
}

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to