mirror of
https://github.com/golang/go.git
synced 2025-05-20 06:43:26 +00:00
cmd/compile: fix language in makeslice comment
Change-Id: I1929ea7e4ed88631ef729472ffe474016efec3e8 Reviewed-on: https://go-review.googlesource.com/56370 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
59413d34c9
commit
66a1d37bf7
@ -1501,7 +1501,7 @@ opswitch:
|
|||||||
fnname := "makeslice64"
|
fnname := "makeslice64"
|
||||||
argtype := types.Types[TINT64]
|
argtype := types.Types[TINT64]
|
||||||
|
|
||||||
// typechecking guarantees that TIDEAL len/cap are positive and fit in an int.
|
// Type checking guarantees that TIDEAL len/cap are positive and fit in an int.
|
||||||
// The case of len or cap overflow when converting TUINT or TUINTPTR to TINT
|
// The case of len or cap overflow when converting TUINT or TUINTPTR to TINT
|
||||||
// will be handled by the negative range checks in makeslice during runtime.
|
// will be handled by the negative range checks in makeslice during runtime.
|
||||||
if (len.Type.IsKind(TIDEAL) || maxintval[len.Type.Etype].Cmp(maxintval[TUINT]) <= 0) &&
|
if (len.Type.IsKind(TIDEAL) || maxintval[len.Type.Etype].Cmp(maxintval[TUINT]) <= 0) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user