Skip to content

Commit 8673a60

Browse files
authored
[Sema] Add missing case to %select in resilience diagnostics (#6847)
Fixes a crasher added in #6839.
1 parent 6f08335 commit 8673a60

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3318,7 +3318,7 @@ WARNING(discardable_result_on_void_never_function, none,
33183318

33193319
ERROR(versioned_attr_with_explicit_accessibility,
33203320
none, "'@_versioned' attribute can only be applied to internal "
3321-
"declarations, but %0 is %select{private|fileprivate|%error|public}1",
3321+
"declarations, but %0 is %select{private|fileprivate|%error|public|open}1",
33223322
(Identifier, Accessibility))
33233323

33243324
#define FRAGILE_FUNC_KIND \
@@ -3332,7 +3332,7 @@ ERROR(local_type_in_inlineable_function,
33323332
(DeclName, unsigned))
33333333

33343334
ERROR(resilience_decl_unavailable,
3335-
none, "%0 %1 is %select{private|fileprivate|internal|%error}2 and "
3335+
none, "%0 %1 is %select{private|fileprivate|internal|%error|%error}2 and "
33363336
"cannot be referenced from " FRAGILE_FUNC_KIND "3",
33373337
(DescriptiveDeclKind, DeclName, Accessibility, unsigned))
33383338

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
77

88
// REQUIRES: asserts
9-
// RUN: not --crash %target-swift-frontend %s -emit-ir
9+
// RUN: not %target-swift-frontend %s -emit-ir
1010
@_versioned
1111
open var a

0 commit comments

Comments
 (0)