How can I clear the swift warning "will never be excuted"? -


now learning swift , when use if - else ,the xcode shows me warniing "will not excuted".though isn't big problem, don't want see this, how can clear warning in project?

this logic error compiler has picked , warning about.

it gives line number in code can never reached.

a) change logic of code

b) delete or comment out lines of code can never reached

the compiler not give message unnecessarily

example

if 1 == 2 {   = 3 }  else {   = 4 } 

obviously condition never met, a=3 assignment can never happen.


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -