We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 075db56 commit 7b26e29Copy full SHA for 7b26e29
validation-test/compiler_crashers_2_fixed/sr16076.swift
@@ -0,0 +1,17 @@
1
+// RUN: %target-swift-frontend -emit-sil -O %s
2
+
3
+// REQUIRES: objc_interop
4
+import Foundation
5
6
+@objc protocol OptionalVar {
7
+ @objc optional var name: String { get }
8
+}
9
10
+extension NSObject: OptionalVar { }
11
12
+do {
13
+ let objects = [NSObject()] as Array<OptionalVar>
14
15
+ let names = objects.compactMap(\.name)
16
+ print("Names: \(names)")
17
0 commit comments