You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicfunc extMemberPrivate(){} // expected-warning {{declaring a public instance method in a private extension}} {{3-9=fileprivate}}
93
-
fileprivatefunc extFuncPrivate(){}
92
+
publicfunc extMemberPrivate(){} // expected-warning {{declaring a public instance method in a private extension}} {{3-10=}}
93
+
fileprivatefunc extFuncPrivate(){} // expected-warning {{'fileprivate' modifier is redundant for instance method declared in a private (equivalent to fileprivate) extension}} {{3-15=}}
94
94
privatefunc extImplPrivate(){}
95
95
}
96
96
publicextensionInternalStruct{ // expected-error {{extension of internal struct cannot be declared public}} {{1-8=}}
publicfunc extMemberPrivate(){} // expected-warning {{declaring a public instance method in a private extension}} {{3-9=fileprivate}}
113
-
fileprivatefunc extFuncPrivate(){}
112
+
publicfunc extMemberPrivate(){} // expected-warning {{declaring a public instance method in a private extension}} {{3-10=}}
113
+
fileprivatefunc extFuncPrivate(){} // expected-warning {{'fileprivate' modifier is redundant for instance method declared in a private (equivalent to fileprivate) extension}} {{3-15=}}
114
114
privatefunc extImplPrivate(){}
115
115
}
116
116
publicextensionFilePrivateStruct{ // expected-error {{extension of fileprivate struct cannot be declared public}} {{1-8=}}
publicfunc extMemberPrivate(){} // expected-warning {{declaring a public instance method in a private extension}} {{3-9=fileprivate}}
133
-
fileprivatefunc extFuncPrivate(){}
132
+
publicfunc extMemberPrivate(){} // expected-warning {{declaring a public instance method in a private extension}} {{3-10=}}
133
+
fileprivatefunc extFuncPrivate(){} // expected-warning {{'fileprivate' modifier is redundant for instance method declared in a private (equivalent to fileprivate) extension}} {{3-15=}}
134
134
privatefunc extImplPrivate(){}
135
135
}
136
136
publicextensionPrivateStruct{ // expected-error {{extension of private struct cannot be declared public}} {{1-8=}}
@@ -149,8 +149,8 @@ fileprivate extension PrivateStruct { // expected-error {{extension of private s
149
149
privatefunc extImplFilePrivate(){}
150
150
}
151
151
privateextensionPrivateStruct{
152
-
publicfunc extMemberPrivate(){} // expected-warning {{declaring a public instance method in a private extension}} {{3-9=fileprivate}}
153
-
fileprivatefunc extFuncPrivate(){}
152
+
publicfunc extMemberPrivate(){} // expected-warning {{declaring a public instance method in a private extension}} {{3-10=}}
153
+
fileprivatefunc extFuncPrivate(){} // expected-warning {{'fileprivate' modifier is redundant for instance method declared in a private (equivalent to fileprivate) extension}} {{3-15=}}
publictypealiasBadPublicComposition3<T>=InternalGenericClass<T>&PublicProto // expected-error {{type alias cannot be declared public because its underlying type uses an internal type}}
717
717
publictypealiasBadPublicComposition4=InternalGenericClass<Int>&PublicProto // expected-error {{type alias cannot be declared public because its underlying type uses an internal type}}
718
718
publictypealiasBadPublicComposition5=PublicGenericClass<InternalStruct>&PublicProto // expected-error {{type alias cannot be declared public because its underlying type uses an internal type}}
719
+
720
+
721
+
openclassClassWithProperties{
722
+
openopen(set)varopenProp=0 // expected-warning {{'open(set)' modifier is redundant for an open property}} {{8-18=}}
723
+
publicpublic(set)varpublicProp=0 // expected-warning {{'public(set)' modifier is redundant for a public property}} {{10-22=}}
724
+
internalinternal(set)varinternalProp=0 // expected-warning {{'internal(set)' modifier is redundant for an internal property}} {{12-26=}}
725
+
fileprivatefileprivate(set)varfileprivateProp=0 // expected-warning {{'fileprivate(set)' modifier is redundant for a fileprivate property}} {{15-32=}}
726
+
privateprivate(set)varprivateProp=0 // expected-warning {{'private(set)' modifier is redundant for a private property}} {{11-24=}}
727
+
internal(set)vardefaultProp=0 // expected-warning {{'internal(set)' modifier is redundant for an internal property}} {{3-17=}}
728
+
}
729
+
730
+
extensionClassWithProperties{
731
+
// expected-warning@+1 {{'internal(set)' modifier is redundant for an internal property}} {{12-26=}}
732
+
internalinternal(set)vardefaultExtProp:Int{
733
+
get{return42}
734
+
set{}
735
+
}
736
+
// expected-warning@+1 {{'internal(set)' modifier is redundant for an internal property}} {{3-17=}}
737
+
internal(set)vardefaultExtProp2:Int{
738
+
get{return42}
739
+
set{}
740
+
}
741
+
}
742
+
743
+
publicextensionClassWithProperties{
744
+
// expected-warning@+2 {{'public' modifier is redundant for property declared in a public extension}} {{3-10=}}
745
+
// expected-warning@+1 {{'public(set)' modifier is redundant for a public property}} {{10-22=}}
746
+
publicpublic(set)varpublicExtProp:Int{
747
+
get{return42}
748
+
set{}
749
+
}
750
+
// expected-warning@+1 {{'public(set)' modifier is redundant for a public property}} {{3-15=}}
751
+
public(set)varpublicExtProp2:Int{
752
+
get{return42}
753
+
set{}
754
+
}
755
+
}
756
+
757
+
internalextensionClassWithProperties{
758
+
// expected-warning@+2 {{'internal' modifier is redundant for property declared in an internal extension}} {{3-12=}}
759
+
// expected-warning@+1 {{'internal(set)' modifier is redundant for an internal property}} {{12-26=}}
760
+
internalinternal(set)varinternalExtProp:Int{
761
+
get{return42}
762
+
set{}
763
+
}
764
+
// expected-warning@+1 {{'internal(set)' modifier is redundant for an internal property}} {{3-17=}}
765
+
internal(set)varinternalExtProp2:Int{
766
+
get{return42}
767
+
set{}
768
+
}
769
+
}
770
+
771
+
fileprivateextensionClassWithProperties{
772
+
// expected-warning@+2 {{'fileprivate' modifier is redundant for property declared in a fileprivate extension}} {{3-15=}}
773
+
// expected-warning@+1 {{'fileprivate(set)' modifier is redundant for a fileprivate property}} {{15-32=}}
0 commit comments