Skip to content

Commit 7ff3fd1

Browse files
committed
[Test] Adds some tests
1 parent 907c2eb commit 7ff3fd1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/decl/var/property_wrappers.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,3 +1644,22 @@ struct UseNonMutatingProjectedValueSet {
16441644
x = 42 // expected-error{{cannot assign to property: 'self' is immutable}}
16451645
}
16461646
}
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+
}

0 commit comments

Comments
 (0)