Skip to content

Commit 792259a

Browse files
committed
Merge pull request #2260 from marksands/swift-2.2-sr-1267-test
Update test to remove dependency on Foundation.
2 parents 7ad6a8b + a6518fd commit 792259a

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed
Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
1-
// XFAIL: linux
21
// RUN: rm -rf %t && mkdir %t
32
// RUN: cp %s %t/main.swift
43
// RUN: %target-swift-frontend -parse -primary-file %t/main.swift -emit-reference-dependencies-path - > %t.swiftdeps
54

65
// SR-1267, SR-1270
7-
import Foundation
8-
9-
class TypeType<T where T: NSString> {
10-
func call(notification: NSNotification?) {
11-
let set = NSOrderedSet()
12-
if let objects = set.array as? [T] {
13-
let _ = (notification?.userInfo?["great_key"] as? NSSet).flatMap { updatedObjects in
14-
return updatedObjects.filter({ element in
15-
guard let element = element as? T
16-
where objects.index(of: element) != nil
17-
else {
18-
return false
19-
}
20-
return true
21-
})
22-
} ?? []
23-
}
24-
}
25-
}
6+
protocol Protocol {}
7+
class ConformingClass: Protocol {}
8+
class BaseClass<T: Protocol> {}
9+
class ConcreteClass<T: ConformingClass> : BaseClass<T> {}

0 commit comments

Comments
 (0)