Results 1 to 2 of 2

Thread: slice2cs enum bug when in another namespace

  1. #1
    linkman is offline Registered User
    Name: liao changbin
    Organization: huhan university
    Project: scada
    Join Date
    Jul 2009
    Posts
    23

    slice2cs enum bug when in another namespace

    I found a bug of slice2cs in below case:

    1. define an enum in namespace A:
    module A
    {
    enum EStatus
    {
    eInit,
    eReady,
    };
    };

    2. Use this enum in a structure of another namespace:
    module B
    {
    struct STest
    {
    A::EStatus eStatus = A::eInit;

    string strName;//to force slice2cs generate a class definition
    };
    };

    Then slice2cs generates an incorrect default constructor of the class STest where the enum is used:

    [_System.CodeDom.Compiler.GeneratedCodeAttribute("s lice2cs", "3.4.1")] public STest() {
    this.eStatus = A.EStatus.A::eInit;
    }

    Please evaluate this issue and get it fixed if needed.

    Thanks for the support.

  2. #2
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Thanks, this will be fixed in the next release.

    Regards,
    Mark

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. slice2cs bug when using a System module
    By MatthiasE in forum Bug Reports
    Replies: 1
    Last Post: 04-11-2011, 11:08 AM
  2. Replies: 2
    Last Post: 05-07-2010, 05:07 PM
  3. Replies: 2
    Last Post: 05-07-2010, 05:07 PM
  4. C++ mapping for a dictionary with an enum as the key
    By mefoster in forum Help Center
    Replies: 3
    Last Post: 10-14-2009, 10:38 AM
  5. Possible bug in slice2cs version 1.5
    By wodi in forum Bug Reports
    Replies: 3
    Last Post: 07-27-2004, 10:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •