Skip to content

Commit 87bce53

Browse files
committed
---
yaml --- r: 327651 b: refs/heads/tensorflow c: 18c05a5 h: refs/heads/master i: 327649: cc6ec95 327647: 597a54a
1 parent c922488 commit 87bce53

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-04-25-a: 22f738a831d43aff2b9c9773bcb65
816816
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-05-08-a: 7d98cc16689baba5c8a3b90a9329bdcc1a12b4e9
817817
refs/heads/cherr42: a566ad54b073c2c56ac0a705d0a5bed9743135a5
818818
"refs/heads/codable_test_comment_fix": fc8f6824f7f347e1e8db55bff62db385c5728b5a
819-
refs/heads/tensorflow: fbb1537c58528286597912406cf0ea457bce57ee
819+
refs/heads/tensorflow: 18c05a51c1f6c63cb1cb93d8fd9676497090df4f
820820
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-11-a: 8126fd7a652e2f70ad6d76505239e34fb2ef3e1a
821821
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-12-a: b3fd3dd84df6717f2e2e9df58c6d7e99fed57086
822822
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-13-a: 71135119579039dc321c5f65d870050fe36efda2

branches/tensorflow/lib/IDE/IDETypeChecking.cpp

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -88,25 +88,6 @@ PrintOptions PrintOptions::printDocInterface() {
8888
return result;
8989
}
9090

91-
/// Erase any associated types within dependent member types, so we'll resolve
92-
/// them again.
93-
static Type eraseAssociatedTypes(Type type) {
94-
if (!type->hasTypeParameter()) return type;
95-
96-
return type.transformRec([](TypeBase *type) -> Optional<Type> {
97-
if (auto depMemType = dyn_cast<DependentMemberType>(type)) {
98-
auto newBase = eraseAssociatedTypes(depMemType->getBase());
99-
if (newBase.getPointer() == depMemType->getBase().getPointer() &&
100-
!depMemType->getAssocType())
101-
return None;
102-
103-
return Type(DependentMemberType::get(newBase, depMemType->getName()));
104-
}
105-
106-
return None;
107-
});
108-
}
109-
11091
struct SynthesizedExtensionAnalyzer::Implementation {
11192
static bool isMemberFavored(const NominalTypeDecl* Target, const Decl* D) {
11293
DeclContext* DC = Target->getInnermostDeclContext();
@@ -186,11 +167,9 @@ struct SynthesizedExtensionAnalyzer::Implementation {
186167
std::set<Requirement> Requirements;
187168
void addRequirement(GenericSignature *GenericSig,
188169
Type First, Type Second, RequirementKind Kind) {
189-
CanType CanFirst =
190-
GenericSig->getCanonicalTypeInContext(eraseAssociatedTypes(First));
170+
CanType CanFirst = GenericSig->getCanonicalTypeInContext(First);
191171
CanType CanSecond;
192-
if (Second) CanSecond =
193-
GenericSig->getCanonicalTypeInContext(eraseAssociatedTypes(Second));
172+
if (Second) CanSecond = GenericSig->getCanonicalTypeInContext(Second);
194173

195174
Requirements.insert({First, Second, Kind, CanFirst, CanSecond});
196175
}

0 commit comments

Comments
 (0)