Skip to content

Commit f24844d

Browse files
committed
[Test] Adds some tests
1 parent d1d4088 commit f24844d

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
@@ -1131,3 +1131,22 @@ struct UseNonMutatingProjectedValueSet {
11311131
x = 42 // expected-error{{cannot assign to property: 'self' is immutable}}
11321132
}
11331133
}
1134+
1135+
// SR-11478
1136+
1137+
@propertyWrapper
1138+
struct SR_11478_W<Value> {
1139+
var wrappedValue: Value
1140+
}
1141+
1142+
class SR_11478_C1 {
1143+
@SR_11478_W static var bool1: Bool = true // Ok
1144+
@SR_11478_W class var bool2: Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1145+
@SR_11478_W class final var bool3: Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1146+
}
1147+
1148+
final class SR_11478_C2 {
1149+
@SR_11478_W static var bool1: Bool = true // Ok
1150+
@SR_11478_W class var bool2: Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1151+
@SR_11478_W class final var bool3: Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1152+
}

0 commit comments

Comments
 (0)