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 e21c179 commit 1eebe58Copy full SHA for 1eebe58
test/decl/var/property_wrappers.swift
@@ -1131,3 +1131,17 @@ struct UseNonMutatingProjectedValueSet {
1131
x = 42 // expected-error{{cannot assign to property: 'self' is immutable}}
1132
}
1133
1134
+
1135
+// SR-11381
1136
1137
+@propertyWrapper
1138
+struct SR_11381_W<T> {
1139
+ init(wrappedValue: T) {}
1140
+ var wrappedValue: T {
1141
+ fatalError()
1142
+ }
1143
+}
1144
1145
+struct SR_11381_S {
1146
+ @SR_11381_W var foo: Int = nil // expected-error {{'nil' is not compatible with expected argument type 'Int'}}
1147
0 commit comments