mirror of
https://github.com/golang/go
synced 2024-11-22 03:44:39 -07:00
doc/go1.1.html: document division by zero change from CL 6710045
I am still not convinced this is a change we should make, but at least documenting it will keep us from forgetting it as we get closer to Go 1.1. R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/7226064
This commit is contained in:
parent
e579395905
commit
779e9dfd4d
@ -14,6 +14,23 @@ TODO
|
||||
|
||||
TODO
|
||||
|
||||
<h3 id="divzero">Integer division by zero</h3>
|
||||
|
||||
<p>
|
||||
In Go 1, integer division by a constant zero produced a runtime panic:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
func f(x int) int {
|
||||
return x/0
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
In Go 1.1, an integer division by constant zero is not a legal program, so it is a compile-time error.
|
||||
</p>
|
||||
|
||||
|
||||
<h2 id="impl">Changes to the implementations and tools</h2>
|
||||
|
||||
TODO: more
|
||||
|
Loading…
Reference in New Issue
Block a user