Skip to content

Commit f22ec51

Browse files
committed
doc: add Go 1.17 release note about inlining functions with closures
Fixes #45781 Change-Id: Ia5bc2845f7f94aff4f3f0ff15533feb148223adb Reviewed-on: https://go-review.googlesource.com/c/go/+/322089 Trust: Dan Scales <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
1 parent 8b462d7 commit f22ec51

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

doc/go1.17.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,14 @@ <h2 id="runtime">Runtime</h2>
228228

229229
<h2 id="compiler">Compiler</h2>
230230

231-
<p>
231+
<p><!-- CL 283112, golang.org/issue/28727 -->
232+
233+
Functions containing closures can now be inlined. One effect of this change is
234+
that a function with a closure may actually produce a distinct closure function
235+
for each place that the function is inlined. Hence, this change could reveal
236+
bugs where Go functions are compared (incorrectly) by pointer value. Go
237+
functions are by definition not comparable.
238+
232239
TODO: complete the Compiler section, or delete if not needed
233240
</p>
234241

0 commit comments

Comments
 (0)