Skip to content
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

Update docs of Array.exists2 to mention ArgumentException being thrown #17453

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gimbling-away
Copy link
Contributor

Description

The example of Array.exists2 originally says that it evaluates to false, however it throws ArgumentException instead

Either the example itself could be fixed, or what it evaluates to could be fixed

I've changed the message, but if the example is supposed to be fixed instead, I'll do that instead

Fixes # (issue, if applicable)

Checklist

  • Test cases added

  • Performance benchmarks added in case of performance changes

  • Release notes entry updated:

    Please make sure to add an entry with short succinct description of the change as well as link to this pull request to the respective release notes file, if applicable.

    Release notes files:

    • If anything under src/Compiler has been changed, please make sure to make an entry in docs/release-notes/.FSharp.Compiler.Service/<version>.md, where <version> is usually "highest" one, e.g. 42.8.200
    • If language feature was added (i.e. LanguageFeatures.fsi was changed), please add it to docs/releae-notes/.Language/preview.md
    • If a change to FSharp.Core was made, please make sure to edit docs/release-notes/.FSharp.Core/<version>.md where version is "highest" one, e.g. 8.0.200.

    Information about the release notes entries format can be found in the documentation.
    Example:

    If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

@gimbling-away gimbling-away requested a review from a team as a code owner July 27, 2024 14:53
Copy link
Contributor

❗ Release notes required

@gimbling-away,

Caution

No release notes found for the changed paths (see table below).

Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format.

The following format is recommended for this repository:

* <Informative description>. ([PR #XXXXX](https://github.com/dotnet/fsharp/pull/XXXXX))

See examples in the files, listed in the table below or in th full documentation at https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html.

If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

You can open this PR in browser to add release notes: open in github.dev

Change path Release notes path Description
src/FSharp.Core docs/release-notes/.FSharp.Core/9.0.100.md No release notes found or release notes format is not correct

@gimbling-away gimbling-away marked this pull request as draft July 27, 2024 14:54
@gimbling-away gimbling-away changed the title Fix docs on Array.exists2 Update docs of Array.exists2 to mention ArgumentException being thrown Jul 27, 2024
@@ -797,7 +797,7 @@ module Array =
///
/// (inputs1, inputs2) ||> Array.exists2 (fun a b -> a > b)
/// </code>
/// Evaluates to <c>false</c>
/// Throws <c>ArgumentException</c>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second example will throw as well. I think we should instead make one example which returns true, one which returns false and one which throws.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants