Skip to content

Commit e8637b8

Browse files
committed
---
yaml --- r: 349474 b: refs/heads/master-next c: 630d7e3 h: refs/heads/master
1 parent 70364c6 commit e8637b8

File tree

4 files changed

+3
-22
lines changed

4 files changed

+3
-22
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: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 5d015dcb5667da49c47846c0089c4b3b1906a1ec
3+
refs/heads/master-next: 630d7e3a7eaede249ea7055971b9a26af2baf2b3
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/include/swift/AST/Decl.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3319,7 +3319,6 @@ class NominalTypeDecl : public GenericTypeDecl, public IterableDeclContext {
33193319

33203320
protected:
33213321
Type DeclaredTy;
3322-
Type DeclaredTyInContext;
33233322
Type DeclaredInterfaceTy;
33243323

33253324
NominalTypeDecl(DeclKind K, DeclContext *DC, Identifier name,
@@ -3378,10 +3377,6 @@ class NominalTypeDecl : public GenericTypeDecl, public IterableDeclContext {
33783377
/// any generic parameters bound if this is a generic type.
33793378
Type getDeclaredType() const;
33803379

3381-
/// getDeclaredTypeInContext - Retrieve the type declared by this entity, with
3382-
/// context archetypes bound if this is a generic type.
3383-
Type getDeclaredTypeInContext() const;
3384-
33853380
/// getDeclaredInterfaceType - Retrieve the type declared by this entity, with
33863381
/// generic parameters bound if this is a generic type.
33873382
Type getDeclaredInterfaceType() const;

branches/master-next/lib/AST/Decl.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3446,18 +3446,6 @@ Type NominalTypeDecl::getDeclaredType() const {
34463446
return DeclaredTy;
34473447
}
34483448

3449-
Type NominalTypeDecl::getDeclaredTypeInContext() const {
3450-
if (DeclaredTyInContext)
3451-
return DeclaredTyInContext;
3452-
3453-
auto *decl = const_cast<NominalTypeDecl *>(this);
3454-
3455-
auto interfaceType = getDeclaredInterfaceType();
3456-
decl->DeclaredTyInContext = mapTypeIntoContext(interfaceType);
3457-
3458-
return DeclaredTyInContext;
3459-
}
3460-
34613449
Type NominalTypeDecl::getDeclaredInterfaceType() const {
34623450
if (DeclaredInterfaceTy)
34633451
return DeclaredInterfaceTy;

branches/master-next/lib/AST/DeclContext.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,8 @@ GenericTypeParamType *DeclContext::getProtocolSelfType() const {
106106
}
107107

108108
Type DeclContext::getDeclaredTypeInContext() const {
109-
if (auto *ED = dyn_cast<ExtensionDecl>(this))
110-
return ED->mapTypeIntoContext(getDeclaredInterfaceType());
111-
if (auto *NTD = dyn_cast<NominalTypeDecl>(this))
112-
return NTD->getDeclaredTypeInContext();
109+
if (auto declaredType = getDeclaredInterfaceType())
110+
return mapTypeIntoContext(declaredType);
113111
return Type();
114112
}
115113

0 commit comments

Comments
 (0)