Comment #0 by verylonglogin.reg — 2013-07-01T01:49:17Z
Some in/out contracts causes "is not nothrow" error when building with "-profile". The only compiler output e.g. for:
---
...
void copyFrom(R)(R r) if(isInputRange!R && is(ElementType!R == T))
out { assert(func(_buff)); }
body { _buff = r.array(); }
...
---
is:
---
..\utils.d(nnn): Error: 'utils.Type!X.Type.func' is not nothrow
---
Workaround:
Disable these contracts or move its code to function body.
Comment #1 by kekeniro2 — 2013-08-27T20:26:17Z
*** This issue has been marked as a duplicate of issue 10617 ***
Comment #2 by verylonglogin.reg — 2013-10-30T07:22:07Z
This is not a duplicate. Even error message is different.
Reduced testcase:
---
void f() { }
void g(T)()
in { f(); } // Error: 'main.f' is not nothrow
body { }
alias gi = g!int;
---