Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reachable statement

 
Stary Kapec
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi, why there is no compile error at line 1?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That wont qualify for an unreachable statement because the finally block always runs after the try block completes. Lets say for some reason your infinite loop fails after sometime because you did something like this...



The compiler thinks since the try might fail for some reason i am gonna let this guy get away with this.
 
Charith Fernando
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

it doesnt give a compilation error saying that its not reachable because it is something to do with the logic of the program. compiler wont check whether a code is reachable by checking the logic of the program...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic