[Issue 13113] New: cannot build druntime's gc.d with -debug=INVARIANT, bad @nogc inference?
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Jul 12 11:04:29 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13113
Issue ID: 13113
Summary: cannot build druntime's gc.d with -debug=INVARIANT,
bad @nogc inference?
Product: D
Version: unspecified
Hardware: All
OS: Windows
Status: NEW
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: r.sagitario at gmx.de
When trying to compile gc.d from druntime with -debug=INVARIANT, I get the
following error:
gc.d(1367): Error: @nogc function 'gc.gc.Gcx.~this' cannot call non- at nogc
function 'gc.gc.Gcx.__invariant'
I've tried reduce this, here's what I get for
//////////////////////
class Gcx
{
~this() {}
invariant()
{
foreach(t; tr) {}
}
Treap!int tr;
}
struct Treap(E)
{
nothrow:
E e;
~this() {}
int opApply(scope int delegate(const ref E) nothrow dg) const
{
return 1;
}
}
///////////////////////
Error: pure function 'nogcinv.Gcx.~this' cannot call impure function
'nogcinv.Gcx.__invariant'
nogcinv.d(5): Error: safe function 'nogcinv.Gcx.~this' cannot call system
function 'nogcinv.Gcx.__invariant'
nogcinv.d(5): Error: @nogc function 'nogcinv.Gcx.~this' cannot call non- at nogc
function 'nogcinv.Gcx.__invariant'
--
More information about the Digitalmars-d-bugs
mailing list