Skip to content

Commit 9fa59f5

Browse files
committed
---
yaml --- r: 315327 b: refs/heads/master-next c: 4aa18db h: refs/heads/master i: 315325: a082972 315323: 4f71789 315319: 3ea4b07 315311: 148c325 315295: b83c635 315263: 4c01978
1 parent 6f3d4e2 commit 9fa59f5

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3fe9333052029c114ef816ea805c335eb1ee8a99
3-
refs/heads/master-next: c3ce3ebb3794ff54b2b79e6bf7349f66f5140190
3+
refs/heads/master-next: 4aa18dbb1c6080eb8394fc13ee32a92e6da7a5c5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/lib/Sema/TypeCheckStorage.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,8 +1633,6 @@ static AccessorDecl *createGetterPrototype(AbstractStorageDecl *storage,
16331633
ASTContext &ctx) {
16341634
SourceLoc loc = storage->getLoc();
16351635

1636-
GenericEnvironment *genericEnvironmentOfLazyAccessor = nullptr;
1637-
16381636
ParamDecl *selfDecl = nullptr;
16391637
if (storage->getDeclContext()->isTypeContext()) {
16401638
if (storage->getAttrs().hasAttribute<LazyAttr>()) {
@@ -1645,8 +1643,6 @@ static AccessorDecl *createGetterPrototype(AbstractStorageDecl *storage,
16451643
bindingDecl->getPatternEntryForVarDecl(varDecl).getInitContext());
16461644

16471645
selfDecl = bindingInit->getImplicitSelfDecl();
1648-
genericEnvironmentOfLazyAccessor =
1649-
bindingInit->getGenericEnvironmentOfContext();
16501646
}
16511647
}
16521648

@@ -1675,18 +1671,6 @@ static AccessorDecl *createGetterPrototype(AbstractStorageDecl *storage,
16751671
if (selfDecl)
16761672
*getter->getImplicitSelfDeclStorage() = selfDecl;
16771673

1678-
// We need to install the generic environment here because:
1679-
// 1) validating the getter will change the implicit self decl's DC to it,
1680-
// 2) it's likely that the initializer will be type-checked before the
1681-
// accessor (and therefore before the normal installation happens), and
1682-
// 3) type-checking a reference to the self decl will map its type into
1683-
// its context, which requires an environment to be installed on that
1684-
// context.
1685-
// We can safely use the enclosing environment because properties are never
1686-
// differently generic.
1687-
if (genericEnvironmentOfLazyAccessor)
1688-
getter->setGenericEnvironment(genericEnvironmentOfLazyAccessor);
1689-
16901674
if (storage->isGetterMutating())
16911675
getter->setSelfAccessKind(SelfAccessKind::Mutating);
16921676
else

0 commit comments

Comments
 (0)