http://d.puremagic.com/issues/show_bug.cgi?id=6365



--- Comment #17 from Kenji Hara <k.hara...@gmail.com> 2011-07-24 07:38:49 PDT 
---
(In reply to comment #16)
> How does it behave for 0-tuples and 1-tuples?

I think 1-element tuple expansion should be allowed.
Now my patch's this support is incomplete. I'll improve it.

// 1-tuple expansion
auto (x1) = [10];
(auto x2) = tuple(10);
(auto x3) = tuple(10)[0..1];
(int x4) = TypeTuple!(10);
assert(x1 == 10);
assert(x2 == 10);
assert(x3 == 10);
assert(x4 == 10);


The 0-element tuple with TupleDeclaration should be error.
Because they has no elements, so expansion cannot get value.

//auto () = [];
//(auto ) = tuple();

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to