aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2020-11-23 15:48:37 -0800
committerRobert Griesemer <gri@golang.org>2020-11-24 00:50:11 +0000
commit762eda346a9f4062feaa8a9fc0d17d72b11586f0 (patch)
treed7de63419c1af84b8e2824daf0da180bea0b076d /test
parent48a1a5189843571a08461a5756e5fe553f966c94 (diff)
downloadgo-762eda346a9f4062feaa8a9fc0d17d72b11586f0.tar.gz
go-762eda346a9f4062feaa8a9fc0d17d72b11586f0.zip
go/types: fix incorrect string(int) conversion (regression)
The bug was introduced by https://golang.org/cl/220844. Fixes #42790. Change-Id: I44d619a1a4d3f2aee1c5575d5cfddcc4ba10895f Reviewed-on: https://go-review.googlesource.com/c/go/+/272666 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'test')
-rw-r--r--test/fixedbugs/issue42790.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/fixedbugs/issue42790.go b/test/fixedbugs/issue42790.go
new file mode 100644
index 0000000000..d83a02247a
--- /dev/null
+++ b/test/fixedbugs/issue42790.go
@@ -0,0 +1,9 @@
+// compile
+
+// Copyright 2020 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.
+
+package p
+
+const _ = -uint(len(string(1<<32)) - len("\uFFFD"))