Skip to content

Commit 2558165

Browse files
authored
Merge pull request swiftlang#14918 from DougGregor/class-in-constrained-ext-rdar37840927
2 parents f50afde + c3c65cb commit 2558165

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %target-run-simple-swift | %FileCheck %s
2+
// REQUIRES: executable_test
3+
4+
class Foo {}
5+
6+
extension Array where Element == Foo {
7+
class Bar { var foo = Foo() }
8+
9+
init(withAThing: String) {
10+
self = [Bar(), Bar(), Bar()].map { $0.foo }
11+
}
12+
}
13+
14+
// CHECK: [main.Foo, main.Foo, main.Foo]
15+
let foos = [Foo](withAThing: "Hi")
16+
print(foos)

0 commit comments

Comments
 (0)