File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
SwiftCompilerSources/Sources/Basic Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -79,11 +79,15 @@ public extension NoReflectionChildren {
79
79
// StringRef
80
80
//===----------------------------------------------------------------------===//
81
81
82
- public struct StringRef : CustomStringConvertible , NoReflectionChildren {
82
+ public struct StringRef : CustomStringConvertible , NoReflectionChildren , ExpressibleByStringLiteral {
83
83
public let _bridged : BridgedStringRef
84
84
85
85
public init ( bridged: BridgedStringRef ) { self . _bridged = bridged }
86
86
87
+ public init ( stringLiteral: StaticString ) {
88
+ self . _bridged = BridgedStringRef ( data: stringLiteral. utf8Start, count: stringLiteral. utf8CodeUnitCount)
89
+ }
90
+
87
91
public var string : String { String ( _bridged) }
88
92
public var description : String { string }
89
93
You can’t perform that action at this time.
0 commit comments