ios - How to suppress compiler warning -


this code:

guard let isnotnil = anoptional         else {             #if debug                 fatalerror()             #endif             return false     } 

gives compiler warning when in debug mode on return false:

will never been executed

which right intention.

how can suppress warning?

with else statement:

guard let isnotnil = anoptional         else {             #if debug                 fatalerror()             #else                 return false             #endif  } 

you can go project or target build settings , disable warning unreachable code.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -