[Issue 7453] Can't return value from within opApply
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Apr 19 19:07:00 PDT 2012
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=7453
--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-04-19 19:07:56 PDT ---
The second sample is fixed because it was a bug in dirEntry's opApply function.
There's just one thing left:
import std.file;
void main(){
    // Error: long has no effect in expression (0)
    foreach (_; dirEntries(".", SpanMode.shallow)) {
        return;
    }
}
void test() {
    // works fine
    foreach (_; dirEntries(".", SpanMode.shallow)) {
        return;
    }
}
Why does the return fail if we're in main()?
-- 
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