On 09/14/2015 08:01 AM, Laeeth Isharc wrote:
> I was trying to use the same variable eg
>
>        auto chain1 = chain("foo", "bar");
>        chain1 = chain(chain1, "baz");
[...]
> It may be that the type of chain1
> and chain2 don't mix.

Exactly.

I was going to recommend using pragma(msg, typeof(chain1)) to see what they are but it looks like chain()'s return type is not templatized. (?)

    pragma(msg, typeof(chain1));
    pragma(msg, typeof(chain2));

Prints

Result
Result

instead of something like (hypothetical)

ChainResult!(string, string)
ChainResult!(ChainResult!(string, string), string)

Ali

  • Re: chaining chain Result and... Ali Çehreli via Digitalmars-d-learn

Reply via email to