https://bugs.swift.org/browse/SR-2 was resolved in Swift 4.1.
Affects this code in StringStyle+Part.swift:
case let .emphasis(emphasis):
self.emphasis = emphasis
default:
// interaction between `#if` and `switch` is disappointing. This case
// is in `default:` to remove a warning that default won't be accessed
// on some platforms.
switch stylePart {
case let .hyphenationFactor(hyphenationFactor):
self.hyphenationFactor = hyphenationFactor
default:
#if os(iOS) || os(tvOS) || os(watchOS)
switch stylePart {
case let .speaksPunctuation(speaksPunctuation):
self.speaksPunctuation = speaksPunctuation
return