www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12310] New: [CTFE] Support heap allocation for built-in scalar types

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

           Summary: [CTFE] Support heap allocation for built-in scalar
                    types
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: CTFE, rejects-valid
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2014-03-07 01:01:50 PST ---
Test case:

bool test()
{
    auto p = new int;
    assert(*p == 0);
    *p = 10;
    assert(*p == 10);

    auto q = new int(3);   // newly supported syntax by the issue 9112
    assert(*q == 3);
    *p = 20;
    assert(*p == 20);

    return true;
}
static assert(test());

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 07 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12310


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2014-03-07 01:08:31 PST ---
https://github.com/D-Programming-Language/dmd/pull/3363

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 07 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12310



--- Comment #2 from github-bugzilla puremagic.com 2014-03-07 01:53:15 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/cdf0a6029a2f0142defaccc4ebabe6ed17798905
fix Issue 12310 - [CTFE] Support heap allocation for built-in scalar types

https://github.com/D-Programming-Language/dmd/commit/75a230000e400a5910527afde2d71cdbf6f40b5b
Merge pull request #3363 from 9rnsr/fix12310

Issue 12310 - [CTFE] Support heap allocation for built-in scalar types

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 07 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12310


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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