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 429f19a commit cddd86fCopy full SHA for cddd86f
test/Constraints/availability.swift
@@ -43,3 +43,24 @@ func unavailableFunction(_ x: Int) -> Bool { true } // expected-note {{'unavaila
43
func f_55700(_ arr: [Int]) {
44
for x in arr where unavailableFunction(x) {} // expected-error {{'unavailableFunction' is unavailable}}
45
}
46
+
47
+// rdar://101814209
48
+public struct Box<T> {
49
+ @usableFromInline
50
+ let value: T
51
+}
52
53
+@available(macOS, unavailable)
54
+extension Box where T == Int {
55
56
+ init(value: T) {
57
+ self.value = value
58
+ }
59
60
61
62
+@_alwaysEmitIntoClient public func aeicFunction() {
63
+ // Select the unavailable @usableFromInline init over the synthesized internal
64
+ // memberwise initializer.
65
+ _ = Box(value: 42)
66
0 commit comments