www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7988] New: [CTFE] CTFE return values should be allowed in compile-time expressions

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7988

           Summary: [CTFE] CTFE return values should be allowed in
                    compile-time expressions
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: clugdbug yahoo.com.au


--- Comment #0 from Don <clugdbug yahoo.com.au> 2012-04-26 01:19:17 PDT ---
Things like this should work. It currently doesn't because CTFE ends when the
function finishes.

class X7988 { int y; this() { y = 2; }}
static assert( (new X7988).y == 2);

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 26 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7988



--- Comment #1 from github-bugzilla puremagic.com 2013-07-12 14:07:10 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9d8d7864c85f4e07be7a7d24ba92108f2206b9f4
Fix issue 7988 allow CTFE return values in compile-time exprs

Test case only. This bug was fixed by doing constfolding in CTFE.

https://github.com/D-Programming-Language/dmd/commit/a0ba3b2aa31d93709a1ed3e21f5a2deca6c761fc
Merge pull request #2339 from donc/fourCTFEtestcases

Test cases for bugs 1982, 7988, 8253, and 8285.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 12 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7988


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED


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