[Issue 7492] [CTFE] Error at assign to immutable character array
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Jan 20 12:01:08 PST 2015
https://issues.dlang.org/show_bug.cgi?id=7492
--- Comment #8 from Denis Shelomovskij <verylonglogin.reg at gmail.com> ---
(In reply to Kenji Hara from comment #7)
> (In reply to Denis Shelomovskij from comment #5)
> > Filed issue 14017.
> ...
> Anyway, at least it's an inconsistent compiler behavior. I reopen this.
Issue 14017 is about this inconsistent behavior.
Also we both changed our positions. I see no reasonable profit from
"effectively `pure`" CTFE-able functions and worst of all such feature will
introduce unpleasant inconsistency:
---
int[] f() { return new int[1]; }
void main()
{
// With effectively `pure` feature:
static immutable s = f(); // OK
immutable s = f(); // error
}
---
So I'm for marking this one as INVALID and for fixing Issue 14017.
--
More information about the Digitalmars-d-bugs
mailing list