http://d.puremagic.com/issues/show_bug.cgi?id=7659



--- Comment #5 from 1100110 <10equa...@gmail.com> 2012-06-21 18:43:01 PDT ---
I encountered this bug, or a similar variant.

I can't decide if I just won the lottery, or if it's reproducable...
I couldn't reproduce it, but I might be missing something important.
All of my attempts simply segfaulted.

This code immediately exits the function with no errors.
It returns the correct value even though I assume the return statement is never
reached since nothing around the return statement will execute.
try
{
  auto f = File(fileName, "w");
  f.write("success");
  f.detach;
  if(true)
  {
     f = File(fileName, "r");
     if(startsWith(f.readln(), "success"))
         success = true;
  }
  f.close;
///All of these cause it to immediately exit the current func.
  f.name;
  writeln(f.name);
  f.name.remove;
}

The catch statement also catches no Exceptions.

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

Reply via email to