Container Array

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Sep 7 13:47:43 PDT 2017


On 09/07/2017 10:39 AM, Vino.B wrote:

 > Array!(Tuple!(string, ulong)) coSizeDirList () {

You stated the return type explicitly above.

 >             return tuple (dFiles[], Subdata[]);

According to the error message, what is being returned does not have the 
same type:

 > Test1.d(27): Error: cannot implicitly convert expression
 > (tuple(dFiles.opSlice(), Subdata.opSlice())) of type
 > Tuple!(RangeT!(Array!(Tuple!string)), RangeT!(Array!ulong)) to
 > Array!(Tuple!(string, ulong))

The actual return type is

     Tuple!(RangeT!(Array!(Tuple!string)), RangeT!(Array!ulong))

There needs to be some transformations to match the two.

Ali



More information about the Digitalmars-d-learn mailing list