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
Post a Comment