]> Cypherpunks repositories - gostls13.git/commit
spec: distinguish between explicit and implicit conversions (clarification)
authorRobert Griesemer <gri@golang.org>
Tue, 2 Oct 2018 22:55:38 +0000 (15:55 -0700)
committerRobert Griesemer <gri@golang.org>
Mon, 8 Oct 2018 17:47:49 +0000 (17:47 +0000)
commit26d22609c389cd9b5a21939183b6411e5861e16b
tree42fcb2917870404c17eb6c41e628cc701ea7bd52
parent7c3b324d265905eec137d92e3a0a9041cad3679d
spec: distinguish between explicit and implicit conversions (clarification)

The spec used the term "conversion" somewhat indiscriminately for
explicit conversions that appear literally in the source, and implicit
conversions that are implied by the context of an expression.
Be clearer about it by defining the terms.

Also, state that integer to string conversions of the form string(x)
are never implicit. This clarifies situations where implicit conversions
might require an integer to change to a string (but don't and never have
done so). See line 3948.

Fixes #26313.

Change-Id: I8939466df6b5950933ae7c987662ef9f88827fda
Reviewed-on: https://go-review.googlesource.com/c/139099
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/go_spec.html