I was experimenting with NSSpellChecker on a macOS app with Swift and I noticed that when there are no spelling mistakes it returns an out of bounds range, specifically one with a lowerBound equals to the max value of a 64-bit signed integer.
Am I doing something wrong or is it a bug on Apple's part?
let sentence = "What a beautiful world."
let range = NSSpellChecker.shared.checkSpelling(of: sentence, startingAt: 0)
// "What a beautiful world." range: {9223372036854775807, 0}
// "What a beautiful worldk." range: {17, 6}