Skip to content

Commit cecdf89

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-next
2 parents edd2fac + b1b60fb commit cecdf89

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/IDE/Refactoring.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3451,7 +3451,9 @@ getDeclarationContextFromInfo(ResolvedCursorInfo Info) {
34513451
return AddEquatableContext(NomDecl);
34523452
}
34533453
} else if (auto *ExtDecl = Info.ExtTyRef) {
3454-
return AddEquatableContext(ExtDecl);
3454+
if (ExtDecl->getExtendedNominal()) {
3455+
return AddEquatableContext(ExtDecl);
3456+
}
34553457
}
34563458
return AddEquatableContext();
34573459
}

test/refactoring/RefactoringKind/crashers.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,11 @@ func test_42098130<T>(e1: T, e2: E_42098130) {
3838
// RUN: %refactor -source-filename %s -pos=31:3 | %FileCheck %s -check-prefix=CHECK3
3939
// RUN: %refactor -source-filename %s -pos=32:3 | %FileCheck %s -check-prefix=CHECK3
4040
// CHECK3: Action begins
41+
42+
// SR-13000
43+
enum Foo {}
44+
typealias Bar = (Any, Any) -> Foo
45+
extension /*invoke here:*/Bar {}
46+
47+
// RUN: %refactor --actions -source-filename %s -pos=45:27 | %FileCheck %s -check-prefix=CHECK4
48+
// CHECK4: Action begins

0 commit comments

Comments
 (0)