www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10520] New: Building with profiler results in "is not nothrow" error on some contracts

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10520

           Summary: Building with profiler results in "is not nothrow"
                    error on some contracts
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



12:49:17 MSD ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 01 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10520


kekeniro2 yahoo.co.jp changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |kekeniro2 yahoo.co.jp
         Resolution|                            |DUPLICATE



*** This issue has been marked as a duplicate of issue 10617 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 27 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10520


Denis Shelomovskij <verylonglogin.reg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|DUPLICATE                   |



17:22:07 MSK ---
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;
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 30 2013