-
Notifications
You must be signed in to change notification settings - Fork 847
Empty shortcuts #5370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty shortcuts #5370
Conversation
|
|
||
| [<CompiledName("DistinctBy")>] | ||
| let distinctBy projection (array:'T[]) = | ||
| let length = array.Length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@forki --- Null check here: Using array without verifying if it is not null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just looked it up - the null check is already in outer function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so I think it's fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's a public API, I'm pretty sure a null check is required,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a public API. Prior to this change the null check was the first line to this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh was looking on the wrong one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed. and thanks!
|
Looks like we are missing a test then. I'll add both.
Kevin Ransom (msft) <notifications@github.com> schrieb am Do., 9. Aug.
2018, 20:35:
… ***@***.**** requested changes on this pull request.
------------------------------
In src/fsharp/FSharp.Core/array.fs
<#5370 (comment)>
:
> @@ -278,6 +281,9 @@ namespace Microsoft.FSharp.Collections
[<CompiledName("DistinctBy")>]
let distinctBy projection (array:'T[]) =
+ let length = array.Length
@forki <https://github.com/forki> --- Null check here: Using array
without verifying if it is not null.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5370 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNOOWGRZgsTLgGjAnJrHmcq7dyr20ks5uPID9gaJpZM4Vanrl>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's a public API, I'm pretty sure a null check is required,
|
The VSTS: public -CI is the gatekeeper now. Fails on ci_part2 and ci_part3. From ci_part2: From ci_part3 |
|
@forki |
|
@KevinRansom As mentioned in #5942 this is an incorrect optimization. We should revert and publish a new version of FSharp.Core assuming this has made it out into the wild (I think it has) Please lets be ultra careful in this in the future... |
|
That is the Seq cases are incorrect |
* Fix and tests, unbuilt and untested * Correct one of the tests Got the order wrong for the output of `countBy`. * Repair the groupBy test groupBy test was bad: it assumed (ridiculously) that groupBy wouldn't iterate the original sequence even though it somehow knew the groups in the sequence.
… (dotnet#5947) * Fix and tests, unbuilt and untested * Correct one of the tests Got the order wrong for the output of `countBy`. * Repair the groupBy test groupBy test was bad: it assumed (ridiculously) that groupBy wouldn't iterate the original sequence even though it somehow knew the groups in the sequence.
more shortcuts in style of #5348