From: Russ Cox Date: Thu, 15 Aug 2013 18:33:26 +0000 (-0400) Subject: spec: &x panics if x does X-Git-Tag: go1.2rc2~546 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5ce78b7cd281b187a06dcdb9ea9d1de8419db297;p=gostls13.git spec: &x panics if x does See golang.org/s/go12nil for the extended version. R=golang-dev, r, adonovan CC=golang-dev https://golang.org/cl/12964043 --- diff --git a/doc/go_spec.html b/doc/go_spec.html index ba7b3644d9..12f43ef2fb 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -3287,7 +3287,10 @@ or an array indexing operation of an addressable array. As an exception to the addressability requirement, x may also be a (possibly parenthesized) composite literal. +If the evaluation of x would cause a run-time panic, +then the evaluation of &x does too.

+

For an operand x of pointer type *T, the pointer indirection *x denotes the value of type T pointed @@ -3302,6 +3305,10 @@ will cause a run-time panic. &Point{2, 3} *p *pf(x) + +var x *int = nil +*x // causes a run-time panic +&*x // causes a run-time panic