mirror of
https://github.com/apple/swift.git
synced 2026-02-27 18:26:24 +01:00
And update tests to use them. This commit depends on fixes in swiftlang/swift PRs #86905, #87129, and #87130. Fixes rdar://169749886.
24 lines
706 B
Swift
24 lines
706 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-emit-module-interface(%t/ParameterizedProtocols.swiftinterface) %s -module-name ParameterizedProtocols
|
|
// RUN: %target-swift-typecheck-module-from-interface(%t/ParameterizedProtocols.swiftinterface) -module-name ParameterizedProtocols
|
|
// RUN: %FileCheck %s < %t/ParameterizedProtocols.swiftinterface
|
|
|
|
public struct S1 : P1 {
|
|
public typealias T = Int
|
|
}
|
|
|
|
public struct S2 : Q1 {}
|
|
|
|
protocol P1 : P2 {}
|
|
|
|
public protocol P2<T> {
|
|
associatedtype T
|
|
}
|
|
|
|
protocol Q1 : Q2 {}
|
|
|
|
public protocol Q2 {}
|
|
|
|
// CHECK: extension ParameterizedProtocols::S1 : ParameterizedProtocols::P2 {}
|
|
// CHECK-NEXT: extension ParameterizedProtocols::S2 : ParameterizedProtocols::Q2 {}
|