https://issues.dlang.org/show_bug.cgi?id=17486

          Issue ID: 17486
           Summary: lazy parameters cannot be used in nothrow/@nogc
                    functions
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/
                OS: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

void f(lazy int x) @nogc {
    x; // Error: @nogc function 'f' cannot call non-@nogc delegate 'x'
}
void g(lazy int x) nothrow {
    x; // Error: 'x' is not nothrow
}

There's no way to annotate the implicit delegate is @nogc, nothrow, etc.

--

Reply via email to