Skip to content

Commit ecaff63

Browse files
committed
---
yaml --- r: 348573 b: refs/heads/master c: 3f8f476 h: refs/heads/master i: 348571: f8e91fa
1 parent 248d5b7 commit ecaff63

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9ba9ba84a493d4aa0bd0e48b1b0ffb929ec4f595
2+
refs/heads/master: 3f8f476e749d8e8f66e67b288c3f1016bb23048a
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/Sema/TypeCheckStorage.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,8 +2349,8 @@ PropertyWrapperBackingPropertyInfoRequest::evaluate(Evaluator &evaluator,
23492349
pbdPattern->setType(storageType);
23502350
pbdPattern = TypedPattern::createImplicit(ctx, pbdPattern, storageType);
23512351
auto pbd = PatternBindingDecl::createImplicit(
2352-
ctx, backingVar->getCorrectStaticSpelling(), pbdPattern,
2353-
/*init*/nullptr, dc, SourceLoc());
2352+
ctx, var->getCorrectStaticSpelling(), pbdPattern,
2353+
/*init*/ nullptr, dc, SourceLoc());
23542354
addMemberToContextIfNeeded(pbd, dc, var);
23552355
pbd->setStatic(var->isStatic());
23562356

trunk/test/decl/var/property_wrappers.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,3 +1646,22 @@ struct UseNonMutatingProjectedValueSet {
16461646
x = 42 // expected-error{{cannot assign to property: 'self' is immutable}}
16471647
}
16481648
}
1649+
1650+
// SR-11478
1651+
1652+
@propertyWrapper
1653+
struct SR_11478_W<Value> {
1654+
var wrappedValue: Value
1655+
}
1656+
1657+
class SR_11478_C1 {
1658+
@SR_11478_W static var bool1: Bool = true // Ok
1659+
@SR_11478_W class var bool2: Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1660+
@SR_11478_W class final var bool3: Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1661+
}
1662+
1663+
final class SR_11478_C2 {
1664+
@SR_11478_W static var bool1: Bool = true // Ok
1665+
@SR_11478_W class var bool2: Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1666+
@SR_11478_W class final var bool3: Bool = true // expected-error {{class stored properties not supported in classes; did you mean 'static'?}}
1667+
}

0 commit comments

Comments
 (0)