Skip to content

Commit 397bb84

Browse files
committed
Revert "Correct Incremental Extension Test"
This reverts commit d65ab09.
1 parent fa89b07 commit 397bb84

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/AST/DeclContext.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,11 @@ Optional<Fingerprint> IterableDeclContext::getBodyFingerprint() const {
10341034

10351035
bool IterableDeclContext::areTokensHashedForThisBodyInsteadOfInterfaceHash()
10361036
const {
1037+
// Do not keep separate hashes for extension bodies because the dependencies
1038+
// can miss the addition of a member in an extension because there is nothing
1039+
// corresponding to the fingerprinted nominal dependency node.
1040+
if (isa<ExtensionDecl>(this))
1041+
return false;
10371042
return true;
10381043
}
10391044

test/Incremental/Fingerprints/Inputs/extension-adds-member/definesAB-after.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ struct A {
33
struct B {
44
}
55
extension A {
6-
init(_ x: String = "") {}
6+
var x: Int {17}
77
}
88
extension B {
99
}

0 commit comments

Comments
 (0)