www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - tuple(tuple(1)) fails to compile, but tuple(tuple(1),1) works

reply "timotheecour" <thelastmammoth gmail.com> writes:
inconsistent:
auto a1=tuple(tuple(1));//CT error
auto a2=tuple(tuple(1),1);//works

bug?
Sep 20 2012
next sibling parent "timotheecour" <thelastmammoth gmail.com> writes:
On Thursday, 20 September 2012 at 23:03:34 UTC, timotheecour 
wrote:
 inconsistent:
 auto a1=tuple(tuple(1));//CT error
 auto a2=tuple(tuple(1),1);//works

 bug?
I filed it here: http://d.puremagic.com/issues/show_bug.cgi?id=8702
Sep 20 2012
prev sibling parent Timon Gehr <timon.gehr gmx.ch> writes:
On 09/21/2012 01:04 AM, timotheecour wrote:
 inconsistent:
 auto a1=tuple(tuple(1));//CT error
 auto a2=tuple(tuple(1),1);//works

 bug?
Yes. In general, if there is a compile time error other than a static assertion failure that points to Phobos code, you can assume that it is a library bug.
Sep 20 2012