Skip to content

Commit 26ef4d1

Browse files
findleyrgopherbot
authored andcommitted
gopls/internal/golang: fix broken build due to semantic merge conflict
Update Cursor.Ancestors()->Cursor.Parent().Enclosing(). CL 660775 renamed Ancestors to Enclosing and made it reflexive. The additional call to Parent leaves the logic equivalent. Change-Id: I792ac981ae3191f6bc26696c50f5990434e39d15 Reviewed-on: https://go-review.googlesource.com/c/tools/+/665635 Auto-Submit: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
1 parent 808c870 commit 26ef4d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gopls/internal/golang/extract.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2045,7 +2045,7 @@ nextBranch:
20452045
(*ast.SelectStmt)(nil),
20462046
}
20472047
// Find innermost relevant ancestor for break/continue.
2048-
for curAncestor := range curBr.Ancestors(filter...) {
2048+
for curAncestor := range curBr.Parent().Enclosing(filter...) {
20492049
if l, ok := curAncestor.Parent().Node().(*ast.LabeledStmt); ok &&
20502050
label != nil &&
20512051
l.Label.Name == label.Name() {

0 commit comments

Comments
 (0)