]> Cypherpunks repositories - gostls13.git/commitdiff
spec: add () to method calls in examples
authorRuss Cox <rsc@golang.org>
Mon, 26 Nov 2012 20:43:32 +0000 (15:43 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 26 Nov 2012 20:43:32 +0000 (15:43 -0500)
Since p.M is rejected (must call methods), use p.M(),
to keep the examples compiling.

Fixes #4441.

R=gri
CC=golang-dev
https://golang.org/cl/6854096

doc/go_spec.html

index 6115fae67b82fef3d3c7a17292b9a6cdd0a1a5e6..458584e000eb814b53723c1e44f40c18095a8dfe 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification",
-       "Subtitle": "Version of November 21, 2012",
+       "Subtitle": "Version of November 26, 2012",
        "Path": "/ref/spec"
 }-->
 
@@ -2463,9 +2463,9 @@ p.z   // (*p).z
 p.y   // ((*p).T1).y
 p.x   // (*(*p).T0).x
 
-p.M2  // (*p).M2
-p.M1  // ((*p).T1).M1
-p.M0  // ((*p).T0).M0
+p.M2()  // (*p).M2()
+p.M1()  // ((*p).T1).M1()
+p.M0()  // ((*p).T0).M0()
 </pre>