File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: %target-swift-ide-test -print-indexed-symbols -source-filename %s | %FileCheck %s
2
2
3
+ // CHECK: [[@LINE+1]]:10 | protocol/Swift | P1 | [[P1_USR:.*]] | Def
3
4
protocol P1 { }
4
5
5
6
// CHECK: [[@LINE+1]]:8 | struct/Swift | S1 | [[S1_USR:.*]] | Def
@@ -76,3 +77,13 @@ func useDisposable(_ d: Disposable?) {
76
77
guard let dispose = d? . dispose else { return }
77
78
_ = dispose
78
79
}
80
+
81
+ func castExpr( x: Any ) {
82
+ // CHECK: [[@LINE+2]]:9 | struct/Swift | S1 | [[S1_USR]] | Ref
83
+ // CHECK: [[@LINE+1]]:17 | protocol/Swift | P1 | [[P1_USR]] | Ref
84
+ _ = S1 ( ) as P1
85
+ // CHECK: [[@LINE+1]]:15 | struct/Swift | S1 | [[S1_USR]] | Ref
86
+ _ = x as! S1
87
+ // CHECK: [[@LINE+1]]:15 | struct/Swift | S1 | [[S1_USR]] | Ref
88
+ _ = x as? S1
89
+ }
You can’t perform that action at this time.
0 commit comments