You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this should probably use x.typ instead of Typ[Int]. Untyped constants were already converted to int at line 1020.
I think the consequence of this is that for an expression like make([]int, uint(1)), the signature passed to recordBuiltinType will incorrectly report the parameter as int instead of uint. I haven't confirmed this though.
griesemer
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Apr 21, 2021
While at it, add missing "invalid argument: " prefix
to a couple of local error messages, for consistency.
For #45667.
Change-Id: I814800b2f3f3750583e335c98a3f8e27030a9daa
Reviewed-on: https://go-review.googlesource.com/c/go/+/312309
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
While looking at go/types source, I noticed this return statement at the end of
(*Checker).index
:go/src/go/types/expr.go
Lines 1047 to 1048 in 5f1df26
I think this should probably use
x.typ
instead ofTyp[Int]
. Untyped constants were already converted toint
at line 1020.I think the consequence of this is that for an expression like
make([]int, uint(1))
, the signature passed torecordBuiltinType
will incorrectly report the parameter asint
instead ofuint
. I haven't confirmed this though./cc @griesemer @findleyr
The text was updated successfully, but these errors were encountered: