[Issue 7197] enum string doesn't work with CTFE

2012-01-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7197



--- Comment #3 from github-bugzi...@puremagic.com 2012-01-27 00:51:34 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/6c081a2bf05524c83e87c71819a9240009a8a7e7
7197 enum string doesn't work with CTFE

Fixes bug 7197.
Oddly, this was actually a bug in the const folding for comma expressions.
The code was originally there as a workaround for another problem which has
since been fixed.

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


[Issue 7197] enum string doesn't work with CTFE

2012-01-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7197


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


Re: [Issue 7197] enum string doesn't work with CTFE

2012-01-25 Thread Geoffrey Brown
On Monday, 2 January 2012 at 02:15:21 UTC, bearophile_h...@eml.cc 
wrote:

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


bearophile_h...@eml.cc changed:

 What|Removed |Added

   CC|
|bearophile_h...@eml.cc



--- Comment #1 from bearophile_h...@eml.cc 2012-01-01 18:15:19 
PST ---

Reduced a bit:


int foo(int[] x...) {
  return 0;
}
template bar(y...) {
  enum int bar = foo(y);
}
enum int z = 1;
enum int w = bar!(z);
void main() {}


Weird, it can be fixed by changing z to a const:
int foo(int[] x...) { return 0; }
template bar(y...) { enum int bar = foo(y); }
const int z = 1;
enum int w = bar!(z);
void main() {}

I'm unable to upgrade to 2.057 because of this bug, it works fine 
in 2.056.


[Issue 7197] enum string doesn't work with CTFE

2012-01-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7197


Geoffrey Brown erkl...@gmail.com changed:

   What|Removed |Added

 CC||erkl...@gmail.com


--- Comment #2 from Geoffrey Brown erkl...@gmail.com 2012-01-25 10:00:46 PST 
---
Weird, it can be fixed by changing z to a const:

int foo(int[] x...) {
  return 0;
}
template bar(y...) {
  enum int bar = foo(y);
}
const int z = 1;
enum int w = bar!(z);
void main() {}

I'm unable to upgrade to 2.057 because of this bug, it works fine in 2.056.

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


[Issue 7197] enum string doesn't work with CTFE

2012-01-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7197


timon.g...@gmx.ch changed:

   What|Removed |Added

 CC||timon.g...@gmx.ch
   Severity|normal  |regression


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


[Issue 7197] enum string doesn't work with CTFE

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


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #1 from bearophile_h...@eml.cc 2012-01-01 18:15:19 PST ---
Reduced a bit:


int foo(int[] x...) {
return 0;
}
template bar(y...) {
enum int bar = foo(y);
}
enum int z = 1;
enum int w = bar!(z);
void main() {}

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