Skip to content

Commit 04cf7dd

Browse files
author
Marc Rasi
committed
add interface printing test
1 parent f644983 commit 04cf7dd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/IDE/print_type_interface.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,22 @@ extension D {
8383
// TYPE5-DAG: public func formIndex(_ i: inout Int, offsetBy distance: Int)
8484
// TYPE5-DAG: public func distance(from start: Int, to end: Int) -> Int
8585
// TYPE5-DAG: public func joined(separator: String = "") -> String
86+
87+
extension Array {
88+
public struct Inner {}
89+
}
90+
91+
public protocol P2 {}
92+
93+
extension Array.Inner where Element: P2 {
94+
public func innerFoo() {}
95+
}
96+
97+
extension Int: P2 {}
98+
99+
// Print interface for Array<Int>.Inner
100+
// RUN: %target-swift-ide-test -print-type-interface -usr=\$sSa20print_type_interfaceE5InnerVySi_GD -module-name print_type_interface -source-filename %s | %FileCheck %s -check-prefix=TYPE6
101+
102+
// TYPE6-LABEL: public struct Inner {
103+
// TYPE6: public func innerFoo()
104+
// TYPE6: }

0 commit comments

Comments
 (0)