Wondering why this doesn't compile:
// in Objective-C:
extern NSString * const TEST_STATIC_OBJC_STRING_CONSTANT;
NSString * const TEST_STATIC_OBJC_STRING_CONSTANT = @"test";
// In Swift:
let ss = StaticString(stringLiteral: TEST_STATIC_OBJC_STRING_CONSTANT)
// Error: Cannot convert value of type 'String' to expected argument type 'StaticString'
and
// in Objective-C:
#define TEST_STATIC_OBJC_STRING_DEFINE @"test"
// in Swift:
let ss = StaticString(stringLiteral: TEST_STATIC_OBJC_STRING_DEFINE)
// Error: Cannot convert value of type 'String' to expected argument type 'StaticString'
Seems like both consts and defines from Objc headers should satisfy as a string literal, no?