www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12296] New: [REG2.066a] const compatible AA pointer conversion is wrongly rejected in CTFE

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

           Summary: [REG2.066a] const compatible AA pointer conversion is
                    wrongly rejected in CTFE
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: CTFE, rejects-valid
          Severity: regression
          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-03 17:57:04 PST ---
This is a regression issue in 2.066a git head, caused by removing
object.AssociativeArray.

Test case:

int testPointerImmutable()
{
    immutable x = [5 : 4];
    auto aa = &x;

    const(int[int])* y = aa;
    // <- cast from immutable(int[int])* to const(int[int])*

    return 1;
}
static assert(testPointerImmutable());

-----
test.d(6): Error: reinterpreting cast from immutable(int[int])* to
const(int[int])* is not supported in CTFE
test.d(11):        called from here: testPointerImmutable()
test.d(11):        while evaluating: static assert(testPointerImmutable())

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


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-03 18:01:26 PST ---
https://github.com/D-Programming-Language/dmd/pull/3355

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



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

https://github.com/D-Programming-Language/dmd/commit/a3551467707c506979aad27f34e1e04fa45f9a13
fix Issue 12296 - const compatible AA pointer conversion is wrongly rejected in
CTFE

https://github.com/D-Programming-Language/dmd/commit/d4b5e33c7f2b1020ac21b0f4809eacc6d8b19a76
Merge pull request #3355 from 9rnsr/fix12296

[REG2.066a] Issue 12296 - const compatible AA pointer conversion is wrongly
rejected in CTFE

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


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 03 2014