Skip to content

Commit 4f2a7cc

Browse files
authored
Fix spelling of retroactive guard (#363)
### Motivation: `hasFeature(RetroactiveAttribute)` doesn't work as expected, but `$RetroactiveAttribute` does. ### Modifications: Switch from `hasFeature` to `$RetroactiveAttribute`. ### Result: - `@retroactive` is applied appropriately
1 parent 63174f3 commit 4f2a7cc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/_OpenAPIGeneratorCore/Extensions/Foundation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414
import Foundation
1515

16-
#if hasFeature(RetroactiveAttribute)
16+
#if $RetroactiveAttribute
1717
extension FileHandle: @retroactive TextOutputStream {}
1818
#else
1919
extension FileHandle: TextOutputStream {}

Sources/swift-openapi-generator/Extensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import ArgumentParser
1616
import _OpenAPIGeneratorCore
1717
import Yams
1818

19-
#if hasFeature(RetroactiveAttribute)
19+
#if $RetroactiveAttribute
2020
extension URL: @retroactive ExpressibleByArgument {}
2121
extension GeneratorMode: @retroactive ExpressibleByArgument {}
2222
extension FeatureFlag: @retroactive ExpressibleByArgument {}

0 commit comments

Comments
 (0)