File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1644,3 +1644,22 @@ struct UseNonMutatingProjectedValueSet {
1644
1644
x = 42 // expected-error{{cannot assign to property: 'self' is immutable}}
1645
1645
}
1646
1646
}
1647
+
1648
+ // SR-11478
1649
+
1650
+ @propertyWrapper
1651
+ struct SR_11478_W < Value> {
1652
+ var wrappedValue : Value
1653
+ }
1654
+
1655
+ class SR_11478_C1 {
1656
+ @SR_11478_W static var bool1 : Bool = true // Ok
1657
+ @SR_11478_W class var bool2 : Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1658
+ @SR_11478_W class final var bool3 : Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1659
+ }
1660
+
1661
+ final class SR_11478_C2 {
1662
+ @SR_11478_W static var bool1 : Bool = true // Ok
1663
+ @SR_11478_W class var bool2 : Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1664
+ @SR_11478_W class final var bool3 : Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1665
+ }
You can’t perform that action at this time.
0 commit comments