[Issue 4454] Can't implicitly cast static arrays of primitives to immutable

2012-09-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4454


Kenji Hara  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #3 from Kenji Hara  2012-09-09 05:03:53 PDT ---
*** This issue has been marked as a duplicate of issue 8201 ***

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


[Issue 4454] Can't implicitly cast static arrays of primitives to immutable

2011-10-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4454



--- Comment #2 from Kenji Hara  2011-10-06 13:56:53 PDT ---
(In reply to comment #1)
[snip]

Sorry, I missed posting issue page. Please ignore comment #1.

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


[Issue 4454] Can't implicitly cast static arrays of primitives to immutable

2011-10-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4454



--- Comment #1 from Kenji Hara  2011-10-06 13:52:30 PDT ---
Remove dependency to std.traits.


private template staticLength(tuple...)
{
enum size_t staticLength = tuple.length;
}
template ReturnType(func...)
if (staticLength!(func) == 1)// (a)
{
static if (is(typeof(func) R == return))
alias R ReturnType;
else
static assert(0, "argument has no return type");
}

struct PointImpl(T)
{
@property auto test()
{
return PointImpl!int();
}
}

struct Wrapper(T)
{
T payload;

auto test()
{
//pragma(msg, ReturnType!(T.test));
//static if (is(ReturnType!(T.test))) { }
static if (is(ReturnType!(T.test) == void)) { }
return payload.test;
}
}

Wrapper!(PointImpl!int) point;

void main()
{
auto x = point.test;
}


A gagged forward reference error at (a) causes this problem.

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