jadengeller
jadengeller
Workaround: \`let x = "lol".data(using: String.Encoding.utf8)! as Data as NSData\`
Likely related to
It's almost entirely impossible to write extensions on Objective-C generic types in Swift. For example, I can't write \`addObjectsFromSequence\` as an extension on \`NSArray\` without accessing the generic type. And...
Might be a duplicate of
What's the reason it crashes for *those* specific types, but not others (\`Int\` for example)?
Sounds like the behavior can differ when \`x\` is used across file boundaries.