aboutsummaryrefslogtreecommitdiff
path: root/test/fixedbugs
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2024-10-22 11:48:38 -0700
committerGopher Robot <gobot@golang.org>2024-10-23 04:43:01 +0000
commit7d9802ac5e8e16dddb7e4368172a1c1666fccb77 (patch)
tree09d94ec357e80bed9e3693dc5ed9f8c8fc8de5a8 /test/fixedbugs
parent7ad9a2c65fbffead70474465f5a0f1ad67fe5703 (diff)
downloadgo-7d9802ac5e8e16dddb7e4368172a1c1666fccb77.tar.xz
go/types, types2: qualify named types in error messages with type kind
Change the description of an operand x that has a named type of sorts by providing a description of the type structure (array, struct, slice, pointer, etc). For instance, given a (variable) operand x of a struct type T, the operand is mentioned as (new): x (variable of struct type T) instead of (old): x (variable of type T) This approach is also used when a basic type is renamed, for instance as in: x (value of uint type big.Word) which makes it clear that big.Word is a uint. This change is expected to produce more informative error messages. Fixes #69955. Change-Id: I544b0698f753a522c3b6e1800a492a94974fbab7 Reviewed-on: https://go-review.googlesource.com/c/go/+/621458 Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'test/fixedbugs')
-rw-r--r--test/fixedbugs/issue48471.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/fixedbugs/issue48471.go b/test/fixedbugs/issue48471.go
index 75875c4004..a834c80675 100644
--- a/test/fixedbugs/issue48471.go
+++ b/test/fixedbugs/issue48471.go
@@ -51,6 +51,6 @@ func g() {
_ = i.(T6) // ERROR "impossible type assertion: i.\(T6\)\n\tT6 does not implement I \(missing method M\)\n\t\thave m\(int\) string\n\t\twant M\(int\)"
var t *T4
- t = i // ERROR "cannot use i \(variable of type I\) as \*T4 value in assignment: need type assertion"
+ t = i // ERROR "cannot use i \(variable of interface type I\) as \*T4 value in assignment: need type assertion"
_ = t
}