commit | c2c92fd21d5352e63b81483defea1fdb7425fefa | [log] [tgz] |
---|---|---|
author | Hana <hyangah@gmail.com> | Fri Nov 19 10:42:18 2021 -0500 |
committer | Hyang-Ah Hana Kim <hyangah@gmail.com> | Mon Nov 22 21:22:40 2021 +0000 |
tree | 751995e5f1256726fddfa1b4c81b19e808e089c9 | |
parent | d0c72119bb3c3f553bdd46ac7a429e1040d64ba3 [diff] |
go/callgraph/vta/internal/trie: fix build with go1.12 - Convert shift count to unsigned to make go1.12 happy. https://github.com/golang/proposal/blob/master/design/19113-signed-shift-counts.md - Require go1.13+ for tests that use the new language features introduced in go1.13. https://golang.org/doc/go1.13#language Change-Id: I30dc5ee44ccf1a76ce30f352751316efdebc5929 Reviewed-on: https://go-review.googlesource.com/c/tools/+/365634 Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Tim King <taking@google.com>
diff --git a/go/callgraph/vta/internal/trie/bits.go b/go/callgraph/vta/internal/trie/bits.go index c343d29..f2fd0ba 100644 --- a/go/callgraph/vta/internal/trie/bits.go +++ b/go/callgraph/vta/internal/trie/bits.go
@@ -46,7 +46,7 @@ if p == 0 { return 0 } - return 1 << (bits.Len64(uint64(p)) - 1) + return bitpos(1) << uint(bits.Len64(uint64(p))-1) // uint conversion needed for go1.12 } // zeroBit returns true if k has a 0 bit at position `b`.
diff --git a/go/callgraph/vta/internal/trie/bits_test.go b/go/callgraph/vta/internal/trie/bits_test.go index f19acdf..07784cd 100644 --- a/go/callgraph/vta/internal/trie/bits_test.go +++ b/go/callgraph/vta/internal/trie/bits_test.go
@@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build go1.13 +// +build go1.13 + package trie import (
diff --git a/go/callgraph/vta/internal/trie/trie_test.go b/go/callgraph/vta/internal/trie/trie_test.go index 68abb5b..c0651b0 100644 --- a/go/callgraph/vta/internal/trie/trie_test.go +++ b/go/callgraph/vta/internal/trie/trie_test.go
@@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build go1.13 +// +build go1.13 + package trie import (