Skip to content

Commit 63bf06d

Browse files
committed
Add regression test for https://bugs.swift.org/browse/SR-11030 / rdar://problem/52266834
1 parent ff99d65 commit 63bf06d

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// RUN: %target-swift-frontend -O -emit-ir %s
2+
3+
public class Coordinator: ConcreteCoordinator {
4+
public func coordinate() {
5+
6+
}
7+
}
8+
9+
public typealias ConcreteCoordinator = InternalBaseCoordinator & CoordinatorProtocol
10+
11+
public protocol CoordinatorProtocol {
12+
func coordinate()
13+
}
14+
15+
public protocol ViewBridgeProtocol {
16+
func createCoordinator() -> ConcreteCoordinator
17+
}
18+
19+
public class InternalBaseViewBridge {
20+
21+
public func startCoordinator() {
22+
abstract().createCoordinator()
23+
.with(success: nil)
24+
.coordinate()
25+
}
26+
27+
private func abstract() -> ViewBridgeProtocol {
28+
return self as! ViewBridgeProtocol
29+
}
30+
31+
}
32+
33+
public class InternalBaseCoordinator: InternalCoordinatorProtocol {
34+
35+
}
36+
37+
public protocol InternalCoordinatorProtocol: AnyObject {
38+
39+
}
40+
41+
extension InternalCoordinatorProtocol {
42+
public func with(success: ((ConcreteCoordinator) -> Void)?) -> Self {
43+
return self
44+
}
45+
}

0 commit comments

Comments
 (0)