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 testConditionalGeneric(_:NormalProtoAssocHolder<ConditionalGenericStruct<NormalStruct>>){} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
extensionPublicInferredAssociatedTypeImpl:PublicInferredAssociatedType{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
195
-
extensionPublicInferredAssociatedTypeImpl:UFIInferredAssociatedType{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
extensionPublicInferredAssociatedTypeImpl:PublicAssociatedTypeProto{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
195
+
extensionPublicInferredAssociatedTypeImpl:UFIAssociatedTypeProto{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
extensionUFIInferredAssociatedTypeImpl:PublicInferredAssociatedType{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
202
-
extensionUFIInferredAssociatedTypeImpl:UFIInferredAssociatedType{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
extensionUFIInferredAssociatedTypeImpl:PublicAssociatedTypeProto{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
202
+
extensionUFIInferredAssociatedTypeImpl:UFIAssociatedTypeProto{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
extensionPublicExplicitAssociatedTypeImpl:PublicAssociatedTypeProto{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
217
+
extensionPublicExplicitAssociatedTypeImpl:UFIAssociatedTypeProto{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
publicstructClassConstrainedGenericArg<T:NormalClass>:PublicInferredAssociatedType{ // expected-error {{cannot use conformance of 'NormalClass' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'T'); 'BADLibrary' has been imported as '@_implementationOnly'}}
254
+
publicstructClassConstrainedGenericArg<T:NormalClass>:PublicAssociatedTypeProto{ // expected-error {{cannot use conformance of 'NormalClass' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'T'); 'BADLibrary' has been imported as '@_implementationOnly'}}
Copy file name to clipboardExpand all lines: test/Sema/implementation-only-import-inlinable-conformances.swift
+4-97Lines changed: 4 additions & 97 deletions
Original file line number
Diff line number
Diff line change
@@ -162,102 +162,9 @@ public func testDefaultArgument(_: Int = NormalProtoAssoc<NormalStruct>()) {} //
162
162
163
163
publicclassSubclassOfNormalClass:NormalClass{}
164
164
165
-
publicfunc testInheritedConformance(_:NormalProtoAssocHolder<SubclassOfNormalClass>){} // expected-error {{cannot use conformance of 'NormalClass' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
166
-
publicfunc testSpecializedConformance(_:NormalProtoAssocHolder<GenericStruct<Int>>){} // expected-error {{cannot use conformance of 'GenericStruct<T>' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
167
-
168
-
extensionArraywhere Element ==NormalProtoAssocHolder<NormalStruct>{ // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
publicfunc testConditionalGeneric(_:NormalProtoAssocHolder<ConditionalGenericStruct<NormalStruct>>){} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
extensionPublicInferredAssociatedTypeImpl:PublicInferredAssociatedType{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
195
-
extensionPublicInferredAssociatedTypeImpl:UFIInferredAssociatedType{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
extensionUFIInferredAssociatedTypeImpl:PublicInferredAssociatedType{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
202
-
extensionUFIInferredAssociatedTypeImpl:UFIInferredAssociatedType{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
publicstructRefinedProtoImpl:RefinedProto{ // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
extensionNormalStruct:RefinedSelfProto{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
extensionNormalStruct:RefinedSelfProtoInheritance{} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
publicstructSlightlyMoreComplicatedRequirementImpl:SlightlyMoreComplicatedRequirement{ // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc.Element' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
236
-
publicfunc takesAssoc(_:[NormalStruct]){}
237
-
}
238
-
publicstructRequirementsHandleSubclassesToo:SlightlyMoreComplicatedRequirement{ // expected-error {{cannot use conformance of 'NormalClass' to 'NormalProto' in associated type 'Self.Assoc.Element' (inferred as 'SubclassOfNormalClass'); 'BADLibrary' has been imported as '@_implementationOnly'}}
publicstructRequirementsHandleSpecializationsToo:SlightlyMoreComplicatedRequirement{ // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc.Element' (inferred as 'ConditionalGenericStruct<NormalStruct>'); 'BADLibrary' has been imported as '@_implementationOnly'}}
publicstructClassConstrainedGenericArg<T:NormalClass>:PublicInferredAssociatedType{ // expected-error {{cannot use conformance of 'NormalClass' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'T'); 'BADLibrary' has been imported as '@_implementationOnly'}}
247
-
publicfunc takesAssoc(_:T){}
165
+
@inlinablepublicfunc testInheritedConformance(){
166
+
_ = NormalProtoAssocHolder<SubclassOfNormalClass>.self // expected-error {{cannot use conformance of 'NormalClass' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
_ = NormalProtoAssocHolder<GenericStruct<Int>>.self // expected-error {{cannot use conformance of 'GenericStruct<T>' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
0 commit comments