Skip to content

Commit e99f6f0

Browse files
authored
Merge pull request #66930 from apple/downgrade-opaque-backdeploy
Sema: temporarily downgrade backdeployed_opaque_result_not_supported to a warning
2 parents 0bb142f + 0a3dadf commit e99f6f0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: include/swift/AST/DiagnosticsSema.def

+1-1
Original file line numberDiff line numberDiff line change
@@ -7059,7 +7059,7 @@ ERROR(attr_incompatible_with_back_deploy,none,
70597059
"'%0' cannot be applied to a back deployed %1",
70607060
(DeclAttribute, DescriptiveDeclKind))
70617061

7062-
ERROR(backdeployed_opaque_result_not_supported,none,
7062+
WARNING(backdeployed_opaque_result_not_supported,none,
70637063
"'%0' is unsupported on a %1 with a 'some' return type",
70647064
(DeclAttribute, DescriptiveDeclKind))
70657065

Diff for: test/attr/attr_backDeployed.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,13 @@ public struct ConformsToTopLevelProtocol: TopLevelProtocol {
266266
}
267267

268268
@available(SwiftStdlib 5.1, *)
269-
@backDeployed(before: macOS 12.0) // expected-error {{'@backDeployed' is unsupported on a var with a 'some' return type}}
269+
@backDeployed(before: macOS 12.0) // expected-warning {{'@backDeployed' is unsupported on a var with a 'some' return type}}
270270
public var cannotBackDeployVarWithOpaqueResultType: some TopLevelProtocol {
271271
return ConformsToTopLevelProtocol()
272272
}
273273

274274
@available(SwiftStdlib 5.1, *)
275-
@backDeployed(before: macOS 12.0) // expected-error {{'@backDeployed' is unsupported on a global function with a 'some' return type}}
275+
@backDeployed(before: macOS 12.0) // expected-warning {{'@backDeployed' is unsupported on a global function with a 'some' return type}}
276276
public func cannotBackDeployFuncWithOpaqueResultType() -> some TopLevelProtocol {
277277
return ConformsToTopLevelProtocol()
278278
}

0 commit comments

Comments
 (0)