[Issue 7267] New: nothrow functions with lazy arguments too
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Jan 10 20:43:32 PST 2012
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=7267
           Summary: nothrow functions with lazy arguments too
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-01-10 20:43:27 PST ---
int foo(lazy int bar) nothrow {
    return bar();
}
void main() {
    int r = foo(10);
}
DMD 2.058 head:
test.d(2): Error: bar is not nothrow
test.d(1): Error: function test4.foo 'foo' is nothrow yet may throw
But I think foo() is allowed to be nothrow.
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list