Skip to content

Commit 59974a5

Browse files
committed
Remove accidentally duplicated tests
These are already checked in implementation-only-import-in-decls.swift.
1 parent fd4eea9 commit 59974a5

File tree

1 file changed

+0
-103
lines changed

1 file changed

+0
-103
lines changed

test/Sema/implementation-only-import-inlinable-conformances.swift

Lines changed: 0 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -158,106 +158,3 @@ extension NormalProtoAssocHolder {
158158
@inlinable public func signatureOfInlinable(_: NormalProtoAssocHolder<NormalStruct>) {} // expected-error{{cannot use conformance of 'NormalStruct' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
159159

160160
public func testDefaultArgument(_: Int = NormalProtoAssoc<NormalStruct>()) {} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
161-
162-
163-
public class SubclassOfNormalClass: NormalClass {}
164-
165-
public func testInheritedConformance(_: NormalProtoAssocHolder<SubclassOfNormalClass>) {} // expected-error {{cannot use conformance of 'NormalClass' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
166-
public func testSpecializedConformance(_: NormalProtoAssocHolder<GenericStruct<Int>>) {} // expected-error {{cannot use conformance of 'GenericStruct<T>' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
167-
168-
extension Array where Element == NormalProtoAssocHolder<NormalStruct> { // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
169-
public func testConstrainedExtensionUsingBadConformance() {}
170-
}
171-
172-
public struct ConditionalGenericStruct<T> {}
173-
extension ConditionalGenericStruct: NormalProto where T: NormalProto {
174-
public typealias Assoc = Int
175-
}
176-
public func testConditionalGeneric(_: NormalProtoAssocHolder<ConditionalGenericStruct<NormalStruct>>) {} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
177-
178-
public protocol PublicInferredAssociatedType {
179-
associatedtype Assoc: NormalProto
180-
func takesAssoc(_: Assoc)
181-
}
182-
@usableFromInline protocol UFIInferredAssociatedType {
183-
associatedtype Assoc: NormalProto
184-
func takesAssoc(_: Assoc)
185-
}
186-
protocol InternalInferredAssociatedType {
187-
associatedtype Assoc: NormalProto
188-
func takesAssoc(_: Assoc)
189-
}
190-
191-
public struct PublicInferredAssociatedTypeImpl {
192-
public func takesAssoc(_: NormalStruct) {}
193-
}
194-
extension PublicInferredAssociatedTypeImpl: 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-
extension PublicInferredAssociatedTypeImpl: UFIInferredAssociatedType {} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
196-
extension PublicInferredAssociatedTypeImpl: InternalInferredAssociatedType {} // okay
197-
198-
@usableFromInline struct UFIInferredAssociatedTypeImpl {
199-
public func takesAssoc(_: NormalStruct) {}
200-
}
201-
extension UFIInferredAssociatedTypeImpl: 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-
extension UFIInferredAssociatedTypeImpl: UFIInferredAssociatedType {} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
203-
extension UFIInferredAssociatedTypeImpl: InternalInferredAssociatedType {} // okay
204-
205-
struct InternalInferredAssociatedTypeImpl {
206-
public func takesAssoc(_: NormalStruct) {}
207-
}
208-
extension InternalInferredAssociatedTypeImpl: PublicInferredAssociatedType {} // okay
209-
extension InternalInferredAssociatedTypeImpl: UFIInferredAssociatedType {} // okay
210-
extension InternalInferredAssociatedTypeImpl: InternalInferredAssociatedType {} // okay
211-
212-
213-
public protocol BaseProtoWithNoRequirement {
214-
associatedtype Assoc
215-
func takesAssoc(_: Assoc)
216-
}
217-
public protocol RefinedProto: BaseProtoWithNoRequirement where Assoc: NormalProto {
218-
}
219-
220-
public struct RefinedProtoImpl: RefinedProto { // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' in associated type 'Self.Assoc' (inferred as 'NormalStruct'); 'BADLibrary' has been imported as '@_implementationOnly'}}
221-
public func takesAssoc(_: NormalStruct) {}
222-
}
223-
224-
public protocol RefinedSelfProto where Self: NormalProto {}
225-
extension NormalStruct: RefinedSelfProto {} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
226-
227-
public protocol RefinedSelfProtoInheritance: NormalProto {}
228-
extension NormalStruct: RefinedSelfProtoInheritance {} // expected-error {{cannot use conformance of 'NormalStruct' to 'NormalProto' here; 'BADLibrary' has been imported as '@_implementationOnly'}}
229-
230-
231-
public protocol SlightlyMoreComplicatedRequirement {
232-
associatedtype Assoc: Collection where Assoc.Element: NormalProto
233-
func takesAssoc(_: Assoc)
234-
}
235-
public struct SlightlyMoreComplicatedRequirementImpl: 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-
public func takesAssoc(_: [NormalStruct]) {}
237-
}
238-
public struct RequirementsHandleSubclassesToo: 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'}}
239-
public func takesAssoc(_: [SubclassOfNormalClass]) {}
240-
}
241-
242-
public struct RequirementsHandleSpecializationsToo: 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'}}
243-
public func takesAssoc(_: [ConditionalGenericStruct<NormalStruct>]) {}
244-
}
245-
246-
public struct ClassConstrainedGenericArg<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-
public func takesAssoc(_: T) {}
248-
}
249-
250-
251-
public protocol RecursiveRequirements {
252-
associatedtype Other: RecursiveRequirements
253-
}
254-
extension GenericStruct: RecursiveRequirements {
255-
public typealias Other = GenericStruct<T>
256-
}
257-
public struct RecursiveRequirementsHolder<T: RecursiveRequirements> {}
258-
public func makeSureRecursiveRequirementsDontBreakEverything(_: RecursiveRequirementsHolder<GenericStruct<Int>>) {}
259-
260-
261-
@inlinable func testFunctionBody() {
262-
263-
}

0 commit comments

Comments
 (0)