On Wednesday, 23 April 2014 at 23:05:39 UTC, Matthew Dudley wrote:
tuple in this case would be the member variable of type T (from T...) So wouldn't elem be the actual object, and not the type?

The effective lowering I was hoping for would be something like this

if (names[0] == "one")
    return tuple[0];
if (names[1] == "one")
    return tuple[1];

etc...

You're probably right, in which case both of those will be null and they are both different types.

That is to say tuple[0] is A.init and tuple[1] is B.init of which a function must only return one type.

Reply via email to