4 Replies Latest reply on Jan 1, 2010 7:43 AM by IlyaG

    Flex sdk 3 requires unreachable code

    mkorpela

      This is annoying me:

       

      function foo():Object {
      var iterable:Iterable = createIterableThing();
      while(true){ 
      somethingThatIWantToDoWithEvery(iterable);
      if(!iterable.hasNext()) return myResult();
      somethingThatIWantToDoWithAllButTheLast(iterable);
      iterable = iterable.next;
      somethingThatIWantToDoWithAllButTheFirst(iterable);
      }
      throw new Error("FLEX SDK THINKS THAT THIS LINE OF CODE IS REACHABLE AND WON'T COMPILE");
      }


      So is there a way to remove that unreachable code part?