Skip to content

Commit 548c00c

Browse files
committed
Update attr tests
1 parent 953742d commit 548c00c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/attr/attr_fixed_layout.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,31 +69,31 @@ struct Rectangle {
6969
//
7070

7171
@frozen struct InternalStruct { // expected-note * {{declared here}}
72-
// expected-error@-1 {{'@frozen' attribute can only be applied to '@usableFromInline' or public declarations, but 'InternalStruct' is internal}}
72+
// expected-error@-1 {{'@frozen' attribute can only be applied to '@usableFromInline', package, or public declarations, but 'InternalStruct' is internal}}
7373

7474
@frozen public struct NestedStruct {}
7575
}
7676

7777
@_fixed_layout struct FixedInternalStruct { // expected-note * {{declared here}}
78-
// expected-error@-1 {{'@_fixed_layout' attribute can only be applied to '@usableFromInline' or public declarations, but 'FixedInternalStruct' is internal}}
78+
// expected-error@-1 {{'@_fixed_layout' attribute can only be applied to '@usableFromInline', package, or public declarations, but 'FixedInternalStruct' is internal}}
7979
// expected-warning@-2 {{'@frozen' attribute is now used for fixed-layout structs}}
8080

8181
@_fixed_layout public struct NestedStruct {}
8282
// expected-warning@-1 {{'@frozen' attribute is now used for fixed-layout structs}}
8383
}
8484

8585
@frozen fileprivate struct FileprivateStruct {}
86-
// expected-error@-1 {{'@frozen' attribute can only be applied to '@usableFromInline' or public declarations, but 'FileprivateStruct' is fileprivate}}
86+
// expected-error@-1 {{'@frozen' attribute can only be applied to '@usableFromInline', package, or public declarations, but 'FileprivateStruct' is fileprivate}}
8787

8888
@_fixed_layout fileprivate struct FixedFileprivateStruct {}
89-
// expected-error@-1 {{'@_fixed_layout' attribute can only be applied to '@usableFromInline' or public declarations, but 'FixedFileprivateStruct' is fileprivate}}
89+
// expected-error@-1 {{'@_fixed_layout' attribute can only be applied to '@usableFromInline', package, or public declarations, but 'FixedFileprivateStruct' is fileprivate}}
9090
// expected-warning@-2 {{'@frozen' attribute is now used for fixed-layout structs}}
9191

9292
@frozen private struct PrivateStruct {} // expected-note * {{declared here}}
93-
// expected-error@-1 {{'@frozen' attribute can only be applied to '@usableFromInline' or public declarations, but 'PrivateStruct' is private}}
93+
// expected-error@-1 {{'@frozen' attribute can only be applied to '@usableFromInline', package, or public declarations, but 'PrivateStruct' is private}}
9494

9595
@_fixed_layout private struct FixedPrivateStruct {} // expected-note * {{declared here}}
96-
// expected-error@-1 {{'@_fixed_layout' attribute can only be applied to '@usableFromInline' or public declarations, but 'FixedPrivateStruct' is private}}
96+
// expected-error@-1 {{'@_fixed_layout' attribute can only be applied to '@usableFromInline', package, or public declarations, but 'FixedPrivateStruct' is private}}
9797
// expected-warning@-2 {{'@frozen' attribute is now used for fixed-layout structs}}
9898

9999

test/attr/attr_inlinable.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public struct Struct {
109109

110110
@inlinable
111111
private func privateInlinableMethod() {
112-
// expected-error@-2 {{'@inlinable' attribute can only be applied to public declarations, but 'privateInlinableMethod' is private}}
112+
// expected-error@-2 {{'@inlinable' attribute can only be applied to internal, package, or public declarations, but 'privateInlinableMethod' is private}}
113113
struct Nested {}
114114
// expected-error@-1 {{type 'Nested' cannot be nested inside an '@inlinable' function}}
115115
}
@@ -326,7 +326,7 @@ extension P {
326326

327327
// rdar://problem/60605117
328328
public struct PrivateInlinableCrash {
329-
@inlinable // expected-error {{'@inlinable' attribute can only be applied to public declarations, but 'formatYesNo' is private}}
329+
@inlinable // expected-error {{'@inlinable' attribute can only be applied to internal, package, or public declarations, but 'formatYesNo' is private}}
330330
private func formatYesNo(_ value: Bool) -> String {
331331
value ? "YES" : "NO"
332332
}

0 commit comments

Comments
 (0)