]> Cypherpunks.ru repositories - gostls13.git/commitdiff
spec: correct example comment in Conversions from slice to array
authorPiers <helloPiers@users.noreply.github.com>
Mon, 19 Jul 2021 20:11:29 +0000 (20:11 +0000)
committerIan Lance Taylor <iant@golang.org>
Mon, 19 Jul 2021 21:59:24 +0000 (21:59 +0000)
Fixes #47280

Change-Id: I78a8d235949b4878c7f075ac4ca37700e7e6c31c
GitHub-Last-Rev: 067f96eeb2c918eb4f775c428edc945c75af44d8
GitHub-Pull-Request: golang/go#47282
Reviewed-on: https://go-review.googlesource.com/c/go/+/335470
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Trust: Than McIntosh <thanm@google.com>

doc/go_spec.html

index ad21ffb1b88515f2291a611d8051824e36efd363..df256f0f0eec053c41135ae3430fa374cd37bfc0 100644 (file)
@@ -4334,7 +4334,7 @@ s4 := (*[4]byte)(s)      // panics: len([4]byte) > len(s)
 
 var t []string
 t0 := (*[0]string)(t)    // t0 == nil
-t1 := (*[1]string)(t)    // panics: len([1]string) > len(s)
+t1 := (*[1]string)(t)    // panics: len([1]string) > len(t)
 </pre>
 
 <h3 id="Constant_expressions">Constant expressions</h3>