[Issue 11268] [REG 2.064beta] cannot use non-constant CTFE pointer in an initializer
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 16 20:55:00 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11268
Luís Marques <luis at luismarques.eu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |luis at luismarques.eu
--- Comment #4 from Luís Marques <luis at luismarques.eu> 2013-10-16 20:54:58 PDT ---
(In reply to comment #3)
> This isn't a regression. It used to compile, but it generated wrong code.
This also used to compile and fail the assert:
const foo = "foo";
const(char)* p = foo.ptr;
void main()
{
assert(p == foo.ptr);
}
(although I did not rely on that behavior, so for me this was a regression)
But if you change to:
const foo = "foo";
const(char)* p = foo; // remove .ptr
void main()
{
assert(p == foo.ptr);
}
It still compiles with git head, and fails the assert.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list