[Issue 12296] New: [REG2.066a] const compatible AA pointer conversion is wrongly rejected in CTFE
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 3 17:57:07 PST 2014
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 at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at 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: -------
More information about the Digitalmars-d-bugs
mailing list