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

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-03T17:57:00Z
Last change time
2014-03-03T20:26:19Z
Keywords
CTFE, pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Blocks
12220

Comments

Comment #0 by k.hara.pg — 2014-03-03T17:57:04Z
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())
Comment #1 by k.hara.pg — 2014-03-03T18:01:26Z
Comment #2 by github-bugzilla — 2014-03-03T19:53:40Z
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