[Issue 3792] Regression: non-constant expression for a template inside a struct using a struct initializer

2010-06-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3792



--- Comment #7 from Don clugd...@yahoo.com.au 2010-06-24 13:55:11 PDT ---
The D2 version of this code never compiled without error.

struct S {
int x;
template T(int val) {
enum S T = { x: val };
}
}
const x = S.T!(0);

It fails to compile because init.c, StructInitializer::toExpression() returns
NULL if any of the fields have names ( if (field.data[i]) goto Lno; )
And this is just because it's never been implemented.

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


[Issue 3792] Regression: non-constant expression for a template inside a struct using a struct initializer

2010-03-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3792


Fawzi Mohamed fa...@gmx.ch changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


--- Comment #5 from Fawzi Mohamed fa...@gmx.ch 2010-03-09 03:24:39 PST ---
As I wrote in my previous comment, the attached testcase still fails...

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


[Issue 3792] Regression: non-constant expression for a template inside a struct using a struct initializer

2010-03-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3792



--- Comment #3 from Fawzi Mohamed fa...@gmx.ch 2010-03-08 00:27:59 PST ---
This bug is listed as fixed in 1.057, but while the reduced case by Matti
Niemenmaa is indeed fixed, the original testcase still fails (I am pointing it
out so that it stays open...)

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


[Issue 3792] Regression: non-constant expression for a template inside a struct using a struct initializer

2010-03-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3792


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #4 from Walter Bright bugzi...@digitalmars.com 2010-03-08 
22:24:37 PST ---
Fixed dmd 1.057

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