-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all: merge master (abc106c) into gopls-release-branch.0.8
Also add a replace directive to gopls/go.mod. Updates golang/go#51074 Conflicts: - gopls/go.mod (due to gofumpt update) Merge List: + 2022-02-28 abc106c gopls/integration/govim: build gopls using go1.18rc1 + 2022-02-28 c2ddf3d internal/lsp: add quick fix for unsupported feature + 2022-02-28 0e44f7a gopls/doc/advanced.md: correct commands for unstable version build + 2022-02-25 acdddf6 go/ssa: allows right operand of a shift to be signed. + 2022-02-25 9ffa3ad internal/lsp: Provide completions for test function definitions + 2022-02-24 b7525f4 internal/lsp: hash go version into package key + 2022-02-24 5210e0c gopls: wire in LangVersion and ModulePath for gofumpt formatting + 2022-02-24 e6ef770 go/types/typeutil: don't recurse into constraints when hashing tparams + 2022-02-23 258e473 internal/lsp/source: disable the useany analyzer by default + 2022-02-23 b7d2949 internal/lsp: don't store diagnostics for builtin.go + 2022-02-23 4f21f7a gopls: update gofumpt to v0.3.0 + 2022-02-22 3e31058 internal/imports: update to permit multiple main modules + 2022-02-22 43f084e internal/typesinternal: update typesinternal for 1.18 + 2022-02-18 897bd77 internal/gocommand: remove support for -workfile + 2022-02-17 e6a7e13 go/analysis/tools/internal/checker: add support for RunDespiteError Change-Id: I4ca5a581cb276b904f4a9d73d686aaa7cb0c6093
- Loading branch information
Showing
37 changed files
with
1,177 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright 2022 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
// Test conversion operations. | ||
|
||
package main | ||
|
||
func left(x int) { _ = 1 << x } | ||
func right(x int) { _ = 1 >> x } | ||
|
||
func main() { | ||
wantPanic( | ||
func() { | ||
left(-1) | ||
}, | ||
"runtime error: negative shift amount", | ||
) | ||
wantPanic( | ||
func() { | ||
right(-1) | ||
}, | ||
"runtime error: negative shift amount", | ||
) | ||
} | ||
|
||
func wantPanic(fn func(), s string) { | ||
defer func() { | ||
err := recover() | ||
if err == nil { | ||
panic("expected panic") | ||
} | ||
if got := err.(error).Error(); got != s { | ||
panic("expected panic " + s + " got " + got) | ||
} | ||
}() | ||
fn() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.