]> Cypherpunks repositories - gostls13.git/commit
go spec: define make() restrictions as for index expressions
authorRobert Griesemer <gri@golang.org>
Fri, 19 Oct 2012 17:11:06 +0000 (10:11 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 19 Oct 2012 17:11:06 +0000 (10:11 -0700)
commit3bde00033b8d1ff7c494d10b1343178c32abb7ad
tree351226448a9efcde22956c1ec12dac36c93e7ba1
parentc117da37a29ad92dd8b6c6abea236aadd7e71896
go spec: define make() restrictions as for index expressions

This is a language change: Until now, the spec required run-
time panics for some of these errors. Note that gc and gccgo
implemented this inconsistently, and that both compilers already
reported compile-time errors in some cases. This change makes
make() behave along the same vein as index expressions.

This addresses the spec aspect of issue 4085.

R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/6725053
doc/go_spec.html