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
Sema: Use the deployment target when checking availability for SPI and unavailable API declarations with -target-min-inlining-version min specified. There's not much benefit to more accurate enforcement of availability in these decls since API clients can't use them and there's a lot of existing code that would be needlessly diagnosed without these exceptions.
_:BetweenTargets, // expected-error {{'BetweenTargets' is only available in}}
963
-
_:AtDeploymentTarget, // expected-error {{'AtDeploymentTarget' is only available in}}
945
+
_:BetweenTargets,
946
+
_:AtDeploymentTarget,
964
947
_:AfterDeploymentTarget // expected-error {{'AfterDeploymentTarget' is only available in}}
965
948
){}
966
949
}
@@ -1081,21 +1064,19 @@ public protocol UnavailableProtoWithAssoc {
1081
1064
associatedtypeA:NoAvailableProto
1082
1065
associatedtypeB:BeforeInliningTargetProto
1083
1066
associatedtypeC:AtInliningTargetProto
1084
-
// FIXME: Next two should be accepted for compatibility (unavailable)
1085
-
associatedtypeD:BetweenTargetsProto // expected-error {{'BetweenTargetsProto' is only available in}}
1086
-
associatedtypeE:AtDeploymentTargetProto // expected-error {{'AtDeploymentTargetProto' is only available in}}
1067
+
associatedtypeD:BetweenTargetsProto
1068
+
associatedtypeE:AtDeploymentTargetProto
1087
1069
associatedtypeF:AfterDeploymentTargetProto // expected-error {{'AfterDeploymentTargetProto' is only available in}}
1088
1070
associatedtypeG:UnavailableProto
1089
1071
}
1090
1072
1091
1073
@_spi(Private)
1092
-
publicprotocolSPINoAvailableProtoWithAssoc{ // expected-note 3 {{add @available attribute to enclosing protocol}}
1074
+
publicprotocolSPINoAvailableProtoWithAssoc{ // expected-note 1 {{add @available attribute to enclosing protocol}}
1093
1075
associatedtypeA:NoAvailableProto
1094
1076
associatedtypeB:BeforeInliningTargetProto
1095
1077
associatedtypeC:AtInliningTargetProto
1096
-
// FIXME: Next two should be accepted (SPI)
1097
-
associatedtypeD:BetweenTargetsProto // expected-error {{'BetweenTargetsProto' is only available in}}
1098
-
associatedtypeE:AtDeploymentTargetProto // expected-error {{'AtDeploymentTargetProto' is only available in}}
1078
+
associatedtypeD:BetweenTargetsProto
1079
+
associatedtypeE:AtDeploymentTargetProto
1099
1080
associatedtypeF:AfterDeploymentTargetProto // expected-error {{'AfterDeploymentTargetProto' is only available in}}
1100
1081
}
1101
1082
@@ -1118,21 +1099,19 @@ public enum UnavailableEnumWithTypeAliases {
1118
1099
publictypealiasA=NoAvailable
1119
1100
publictypealiasB=BeforeInliningTarget
1120
1101
publictypealiasC=AtInliningTarget
1121
-
// FIXME: Next two should be accepted for compatibility (unavailable)
1122
-
publictypealiasD=BetweenTargets // expected-error {{'BetweenTargets' is only available in}} expected-note {{add @available attribute to enclosing type alias}}
1123
-
publictypealiasE=AtDeploymentTarget // expected-error {{'AtDeploymentTarget' is only available in}} expected-note {{add @available attribute to enclosing type alias}}
1102
+
publictypealiasD=BetweenTargets
1103
+
publictypealiasE=AtDeploymentTarget
1124
1104
publictypealiasF=AfterDeploymentTarget // expected-error {{'AfterDeploymentTarget' is only available in}} expected-note {{add @available attribute to enclosing type alias}}
1125
1105
publictypealiasG=Unavailable
1126
1106
}
1127
1107
1128
1108
@_spi(Private)
1129
-
publicenumSPIEnumWithTypeAliases{ // expected-note 3 {{add @available attribute to enclosing enum}}
1109
+
publicenumSPIEnumWithTypeAliases{ // expected-note 1 {{add @available attribute to enclosing enum}}
1130
1110
publictypealiasA=NoAvailable
1131
1111
publictypealiasB=BeforeInliningTarget
1132
1112
publictypealiasC=AtInliningTarget
1133
-
// FIXME: Next two should be accepted (SPI)
1134
-
publictypealiasD=BetweenTargets // expected-error {{'BetweenTargets' is only available in}} expected-note {{add @available attribute to enclosing type alias}}
1135
-
publictypealiasE=AtDeploymentTarget // expected-error {{'AtDeploymentTarget' is only available in}} expected-note {{add @available attribute to enclosing type alias}}
1113
+
publictypealiasD=BetweenTargets
1114
+
publictypealiasE=AtDeploymentTarget
1136
1115
publictypealiasF=AfterDeploymentTarget // expected-error {{'AfterDeploymentTarget' is only available in}} expected-note {{add @available attribute to enclosing type alias}}
0 commit comments