diff --git a/Sources/_OpenAPIGeneratorCore/Extensions/Foundation.swift b/Sources/_OpenAPIGeneratorCore/Extensions/Foundation.swift index 2d6dc601..d6051cb8 100644 --- a/Sources/_OpenAPIGeneratorCore/Extensions/Foundation.swift +++ b/Sources/_OpenAPIGeneratorCore/Extensions/Foundation.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import Foundation -#if compiler(>=5.11) +#if hasFeature(RetroactiveAttribute) extension FileHandle: @retroactive TextOutputStream {} #else extension FileHandle: TextOutputStream {} diff --git a/Sources/swift-openapi-generator/Extensions.swift b/Sources/swift-openapi-generator/Extensions.swift index e847da49..eccfd746 100644 --- a/Sources/swift-openapi-generator/Extensions.swift +++ b/Sources/swift-openapi-generator/Extensions.swift @@ -16,7 +16,7 @@ import ArgumentParser import _OpenAPIGeneratorCore import Yams -#if compiler(>=5.11) +#if hasFeature(RetroactiveAttribute) extension URL: @retroactive ExpressibleByArgument {} extension GeneratorMode: @retroactive ExpressibleByArgument {} extension FeatureFlag: @retroactive ExpressibleByArgument {}