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

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -