Skip to content

Commit

Permalink
doc: add Go 1.17 release note about inlining functions with closures
Browse files Browse the repository at this point in the history
Fixes golang#45781

Change-Id: Ia5bc2845f7f94aff4f3f0ff15533feb148223adb
Reviewed-on: https://go-review.googlesource.com/c/go/+/322089
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
  • Loading branch information
danscales committed May 25, 2021
1 parent 8b462d7 commit f22ec51
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion doc/go1.17.html
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,14 @@ <h2 id="runtime">Runtime</h2>

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

<p>
<p><!-- CL 283112, golang.org/issue/28727 -->

Functions containing closures can now be inlined. One effect of this change is
that a function with a closure may actually produce a distinct closure function
for each place that the function is inlined. Hence, this change could reveal
bugs where Go functions are compared (incorrectly) by pointer value. Go
functions are by definition not comparable.

TODO: complete the Compiler section, or delete if not needed
</p>

Expand Down

0 comments on commit f22ec51

Please sign in to comment.