Archived

This forum has been archived. Please start a new discussion on GitHub.

Sequences with slice2cs 3.3.0

Hello,

Sequences and Dictionnaries generations seem to be wrong with slice2cs 3.3.0.

See my slice :
module TestIce
{
    sequence<long> TestSeq;
    
};

Here's the whole generated file :
namespace TestIce
{
    public sealed class TestSeqHelper
    {
        public static void write(IceInternal.BasicStream os__, long[] v__)
        {
            os__.writeLongSeq(v__);
        }

        public static long[] read(IceInternal.BasicStream is__)
        {
            long[] v__;
            v__ = is__.readLongSeq();
            return v__;
        }
    }
}

A lot of code is missing, but I did not get any error during generation.

Thank you for your help.

Comments

  • dwayne
    dwayne St. John's, Newfoundland
    Why do you think there is code missing?
  • Because "TestSeq" is not defined anywhere. I cannot use my sequence because it does not exist on generated file.
  • mes
    mes California
    Because "TestSeq" is not defined anywhere. I cannot use my sequence because it does not exist on generated file.
    The C# mapping chapter states:
    By default, sequences are mapped to arrays.
    This means the Slice-to-C# compiler does not generate a type named TestSeq, but uses a native C# array (long[]) everywhere TestSeq is expected.

    Cheers,
    Mark
  • Ok sorry. I did not see this change.

    Thank you for your help.