Skip to content

Commit 855acff

Browse files
authored
Merge pull request #66931 from apple/downgrade-opaque-backdeploy-5.9
[5.9] Sema: temporarily downgrade backdeployed_opaque_result_not_supported to a warning
2 parents 2a62070 + 97a7085 commit 855acff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6989,7 +6989,7 @@ ERROR(attr_incompatible_with_back_deploy,none,
69896989
"'%0' cannot be applied to a back deployed %1",
69906990
(DeclAttribute, DescriptiveDeclKind))
69916991

6992-
ERROR(backdeployed_opaque_result_not_supported,none,
6992+
WARNING(backdeployed_opaque_result_not_supported,none,
69936993
"'%0' is unsupported on a %1 with a 'some' return type",
69946994
(DeclAttribute, DescriptiveDeclKind))
69956995

test/attr/attr_backDeployed.swift

Lines changed: 2 additions & 2 deletions
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)