[Issue 11504] [CTFE] JSONValue cannot make in CTFE

2013-11-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11504


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

   Keywords||pull


--- Comment #7 from Kenji Hara k.hara...@gmail.com 2013-11-22 02:35:37 PST ---
Issue 10527 has been fixed. So add a link to pull request.

https://github.com/D-Programming-Language/dmd/pull/2757

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


[Issue 11504] [CTFE] JSONValue cannot make in CTFE

2013-11-16 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11504


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

   Keywords||CTFE
  Component|Phobos  |DMD


--- Comment #5 from Kenji Hara k.hara...@gmail.com 2013-11-16 02:41:13 PST ---
(In reply to comment #4)
 (In reply to comment #2)
  The reason why the code mentioned above was OK in the past is a thing by the
  bugs of the compilers. (SeeAlso: Issue11427
 
 std.json was refactored a while ago and it might be the cause of this
 regression. But I still don't understand what the problem is with this code
 *right now*. Can anyone try to explain what SHOO meant in plain English?

I separately filed the true std.json regression as issue 11527.
After fixing the bug, the OP case will print following errors.

C:\dmd2\src\phobos\std\json.d(181): Error: Unions with overlapping fields are
not yet supported in CTFE
C:\dmd2\src\phobos\std\json.d(103):called from here: this.assign(v)
test.d(6):called from here: v.integer(1L)
test.d(12):called from here: foo()

The error is caused by issue 11510, and could be fixed by my compiler
enhancement fix.

I change this to dmd issue.

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


[Issue 11504] [CTFE] JSONValue cannot make in CTFE

2013-11-16 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11504


John Colvin john.loughran.col...@gmail.com changed:

   What|Removed |Added

 CC||john.loughran.colvin@gmail.
   ||com


--- Comment #6 from John Colvin john.loughran.col...@gmail.com 2013-11-16 
12:50:11 GMT ---
(In reply to comment #5)
 (In reply to comment #4)
  (In reply to comment #2)
   The reason why the code mentioned above was OK in the past is a thing by 
   the
   bugs of the compilers. (SeeAlso: Issue11427
  
  std.json was refactored a while ago and it might be the cause of this
  regression. But I still don't understand what the problem is with this code
  *right now*. Can anyone try to explain what SHOO meant in plain English?
 
 I separately filed the true std.json regression as issue 11527.

I would argue that is not necessarily a bug. See my comments in issue 11527 and
https://github.com/D-Programming-Language/phobos/pull/1693

https://d.puremagic.com/issues/show_bug.cgi?id=11510 is the real problem here,
as you rightly point out.

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


[Issue 11504] [CTFE] JSONValue cannot make in CTFE

2013-11-15 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11504



--- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-11-15 
10:24:30 PST ---
(In reply to comment #2)
 The reason why the code mentioned above was OK in the past is a thing by the
 bugs of the compilers. (SeeAlso: Issue11427

std.json was refactored a while ago and it might be the cause of this
regression. But I still don't understand what the problem is with this code
*right now*. Can anyone try to explain what SHOO meant in plain English?

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


[Issue 11504] [CTFE] JSONValue cannot make in CTFE

2013-11-13 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11504


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

 Blocks||11510


--- Comment #3 from Kenji Hara k.hara...@gmail.com 2013-11-13 07:13:55 PST ---
(In reply to comment #2)
 This problem is settled by supporting union formally in CTFE.

For that, I posted a compiler enhancement issue 11510.

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


[Issue 11504] [CTFE] JSONValue cannot make in CTFE

2013-11-12 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11504


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-11-12 
07:59:57 PST ---
What exactly is the problem? There's an exception thrown:

std\json.d(765): Error: Uncaught CTFE exception
std.json.JSONException(JSONValue is not an integer)
test.d(6):thrown from here
test.d(12):called from here: foo()

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


[Issue 11504] [CTFE] JSONValue cannot make in CTFE

2013-11-12 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11504



--- Comment #2 from SHOO zan77...@nifty.com 2013-11-12 09:48:10 PST ---
Quite honestly, the behavior that this code makes the compilation error by the
exception in CTFE is a destructive change, but thinks that I can permit it.
The big problem is that even if every other methods, union (JSONValue.Store)
cannot be initialized.
The reason why the code mentioned above was OK in the past is a thing by the
bugs of the compilers. (SeeAlso: Issue11427
This problem is settled by supporting union formally in CTFE.

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