[Issue 17486] New: lazy parameters cannot be used in nothrow/@nogc functions
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Fri Jun  9 12:26:15 PDT 2017
    
    
  
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: nobody at puremagic.com
          Reporter: eyal at weka.io
void f(lazy int x) @nogc {
    x; // Error: @nogc function 'f' cannot call non- at 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.
--
    
    
More information about the Digitalmars-d-bugs
mailing list