Revert "Allow return in tailrec position" #14067 #14736
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reverts #14067.
That PR allowed code that was using explicit returns in tailrec positions. This was rejected by all compilers older than 3.1.2-RC1. If a tailrec function with explicit returns was defined inside of an inline function, compilers up to version 3.1.1 wouldn't be able to perform the inlining. This means that the change is breaking binary compatibility between two patch releases in the 3.1 versioning line.
This pr needs to be backported to
release-3.1.2
branch, then 3.1.2-RC3 needs to be released.We can re-merge #14067 before releasing the next minor version (3.2).