Skip to content

Commit 6da2ca7

Browse files
committed
[ASTPrinter] Test case for moduleinterface with member typealiases
1 parent 62078c7 commit 6da2ca7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path - %s -enable-library-evolution -module-name MyModule | %FileCheck %s --check-prefix CHECK
2+
3+
public struct MyStruct<T> {
4+
// CHECK-LABEL: public struct MyStruct<T> {
5+
public typealias AliasT = T
6+
public typealias AliasInt = Int
7+
8+
public func foo(x: AliasInt) -> AliasT { fatalError() }
9+
// CHECK: public func foo(x: MyModule.MyStruct<T>.AliasInt) -> MyModule.MyStruct<T>.AliasT
10+
}
11+
12+
public class MyBase<U> {
13+
public typealias AliasU = U
14+
public typealias AliasInt = Int
15+
}
16+
17+
public class MyDerived<X>: MyBase<X> {
18+
// CHECK-LABEL: public class MyDerived<X> : MyModule.MyBase<X> {
19+
public func bar(x: AliasU) -> AliasInt { fatalError() }
20+
// CHECK: public func bar(x: MyModule.MyDerived<X>.AliasU) -> MyModule.MyDerived<X>.AliasInt
21+
}

0 commit comments

Comments
 (0)