Is this a bug in swift ? or am i missing something here i have declared the following
let opts = (NSLinguisticTaggerOptions.OmitWhitespace | NSLinguisticTaggerOptions.JoinNames)
i get the following error fatal error: Can't unwrap Optional.None Playground execution failed: error: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0). The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.
update if i inline the option in to the calling method, it seems to work
let tagger = NSLinguisticTagger(tagSchemes:NSLinguisticTagger.availableTagSchemesForLanguage("en"), options: 3)
tagger.string = someString
//if i inline the options it seems to work
tagger.enumerateTagsInRange(r, scheme: NSLinguisticTagSchemeNameTypeOrLexicalClass, options:(NSLinguisticTaggerOptions.OmitWhitespace | NSLinguisticTaggerOptions.JoinNames)){
tag,range,_,_ in
let token = nsstr.substringWithRange(range)
println("\(tag), \(token)")
}