Span: complete matrix of tests #5092
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 adds a new matrix of tests for passing inref --> byref and so on.
It also clarifies the symmetry between inref (readonly) and outref (writeonly) and explicitly highlights the point where we weaken the rules around outref to allow reading from outref (see the RFC for why this is done, for compat purposes).
It also fixes one bug found by the matrix of tests and code review yesterday with @TIHan
Finally, it labels the
byref<'T, 'Kind>and theByRefKindsas for-library-use-only, though they don't disappear. After reviewing with @TIHan we concluded that for F# 4.5 the best plan was to do this, there is no need to make the more primitive form available for use by the user at this stage, there is nothing useful they can do with it that they can't do withinref,byrefandoutrefand attempts to do so (e.g. user-defined tags) are neither useful nor under test.