[Issue 13300] New: pure function 'std.array.Appender!(T[]).Appender.ensureAddable' cannot call impure function 'test.T.__fieldPostBlit'
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Aug 15 13:48:41 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13300
Issue ID: 13300
Summary: pure function
'std.array.Appender!(T[]).Appender.ensureAddable'
cannot call impure function 'test.T.__fieldPostBlit'
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid
Severity: regression
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: thecybershadow at gmail.com
////////// test.d //////////
import std.array;
import std.variant;
alias Algebraic!bool Value;
struct T
{
Value value;
@disable this();
}
void main()
{
auto a = appender!(T[]);
}
////////////////////////////
Compiler output:
C:\...\std\array.d(2400,34): Error: pure function
'std.array.Appender!(T[]).Appender.ensureAddable' cannot call impure function
'test.T.__fieldPostBlit'
C:\...\std\array.d(2729,1): Error: template instance std.array.Appender!(T[])
error instantiating
test.d(14,11): instantiated from here: appender!(T[])
Introduced in https://github.com/D-Programming-Language/phobos/pull/2147
--
More information about the Digitalmars-d-bugs
mailing list