Skip to content

Don't cause index out of range exn in completion - #17227

Merged
vzarytovskii merged 2 commits into
dotnet:mainfrom
brianrourkeboll:multi-arg-delegates
May 22, 2024
Merged

Don't cause index out of range exn in completion#17227
vzarytovskii merged 2 commits into
dotnet:mainfrom
brianrourkeboll:multi-arg-delegates

Conversation

@brianrourkeboll

@brianrourkebollbrianrourkeboll commented May 22, 2024

Copy link
Copy Markdown
Contributor

Description

Fixes#17226.

  • Dotting into delegates with multiple type arguments would trigger an index out of range exception. Now it doesn't.

Checklist

  • Tests: I spent a while trying to get a test for this to work, but it seems like it might be rather difficult, since this pathway only seems to be called sometimes. Compare:

    // Use an environment lookup as the last resort
    letenvItems,denv,m =
    GetEnvironmentLookupResolutions(nenv, ad, m, plid, filterCtors, residueOpt.IsSome)

    But here's a recording of the fix working:

    dot_delegate_working.mp4
  • Release notes entry updated.

* Dotting into delegates with multiple type arguments would trigger an
index out of range exception. Now it doesn't.
@github-actions

github-actionsBot commented May 22, 2024

Copy link
Copy Markdown
Contributor

❗ Release notes required


✅ Found changes and release notes in following paths:

Change pathRelease notes pathDescription
src/Compilerdocs/release-notes/.FSharp.Compiler.Service/8.0.400.md

@brianrourkeboll
brianrourkeboll marked this pull request as ready for review May 22, 2024 14:29
@brianrourkeboll
brianrourkeboll requested a review from a team as a code ownerMay 22, 2024 14:29

@vzarytovskiivzarytovskii left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, thanks.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Internal error when dotting into delegate with 2 or more type parameters

2 participants

@brianrourkeboll@vzarytovskii