The Apple documentation TN2151 says this for a possible cause of a EXC_BREAKPOINT
/ SIGTRAP
:
a non-optional type with a nil valu
Happens when interoperating with Objective C. An objc-method could be annotated as nonnull
, but nothing prevents it from returning nil
anyways. The compiler catches only the most obvious cases and even then it only produces warnings (e.g. when you blatently return nil;
in a method that is specified as not returning nil.)