Skip to content

Commit 296ecf2

Browse files
authored
Merge pull request #14071 from nathawes/r33334141-add-regression-test
2 parents 0af4c41 + d567d43 commit 296ecf2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
public struct Foo<T> {
2+
let prop: Int
3+
}
4+
extension Foo where T: AnyObject {
5+
public var foo: Int { return 1 }
6+
}
7+
_ = Foo<Int>(prop: 42).prop
8+
9+
10+
// RUN: %sourcekitd-test -req=cursor -cursor-action -pos=7:24 -length 4 %s -- %s | %FileCheck %s
11+
12+
// CHECK: source.lang.swift.ref.var.instance (2:7-2:11)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
public class Observable<Element> {
2+
public typealias E = Element
3+
}
4+
Observable.create { }
5+
6+
// RUN: %sourcekitd-test -req=cursor -cursor-action -pos=4:12 -length 10 %s -- %s | %FileCheck %s
7+
8+
// CHECK: source.lang.swift.ref.module ()

0 commit comments

Comments
 (0)