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 5d1a1ff commit b3d3ef3Copy full SHA for b3d3ef3
test/decl/var/property_wrappers.swift
@@ -1683,3 +1683,17 @@ final class SR_11478_C2 {
1683
@SR_11478_W class var bool2: Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1684
@SR_11478_W class final var bool3: Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1685
}
1686
+
1687
+// SR-11381
1688
1689
+@propertyWrapper
1690
+struct SR_11381_W<T> {
1691
+ init(wrappedValue: T) {}
1692
+ var wrappedValue: T {
1693
+ fatalError()
1694
+ }
1695
+}
1696
1697
+struct SR_11381_S {
1698
+ @SR_11381_W var foo: Int = nil // expected-error {{'nil' is not compatible with expected argument type 'Int'}}
1699
0 commit comments