-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/refactor/inline: permit return conversions in tailcall
Previously, the tail-call strategies required that the callee's implicit return conversions must be trivial. That meant returning a nil error (for example) defeated these strategies, even though it is common in tail-call situations for the caller function to have identical result types. For example: func callee() error { return nil } // nontrivial conversion func caller() error { return callee() } // identical result types This change permits the tail-call strategies when the callee and caller's results tuples are identical. Fixes golang/go#63336 Change-Id: I57d62213023861a2cfebed25b01ec28921efe441 Reviewed-on: https://go-review.googlesource.com/c/tools/+/533075 Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
- Loading branch information
Showing
2 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters