GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Avoid duplicate intrinsic method suggestions in tab completion by rudy-07 · Pull Request #28301 · PowerShell/PowerShell

Conversation

@rudy-07

@rudy-07 Rudransh Shekhar (rudy-07) commented Nov 2, 2026

Copy link
Copy Markdown

PR Summary

Prevent CompleteExtensionMethods from appending intrinsic collection methods (ForEach, Where, PSForEach, PSWhere) when a type-native member with that name already exists in the completion candidate list.

PR Context

Fix #24729

When completing members on objects defining native methods like List<T>.ForEach(Action<T>), tab completion returned two ForEach entries. The second was the intrinsic method which cannot be invoked due to method resolution prioritizing the native member. This change checks results before adding intrinsic methods so duplicates are omitted while non-colliding methods (like PSForEach) continue to be completed.

PR Checklist

  • PR has a meaningful title
  • Summarized changes
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge.
  • Breaking changes
    • None
  • User-facing changes
    • Not Applicable
  • Testing - New and feature
    • Added regression test to test/powershell/Host/TabCompletion/BugFix.Tests.ps1

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rudy-07
Avoid duplicate intrinsic methods in tab completion
02d6376
Prevent CompleteExtensionMethods from appending intrinsic collection methods when a type-native member with the same name already exists in the completion candidate list.

Fix PowerShell#24729
Copilot AI balanced review requested due to automatic review settings November 2, 2026 20:40
@rudy-07
Rudransh Shekhar (rudy-07) requested a review from a team as a code owner November 2, 2026 20:40
Copilot AI reviewed Nov 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@azure-pipelines

azure-pipelines Bot commented Nov 2, 2026

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rudy-07

Rudransh Shekhar (rudy-07) commented Nov 2, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Review - Needed The PR is being reviewed label Nov 10, 2026
@microsoft-github-policy-service

microsoft-github-policy-service Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Review - Needed The PR is being reviewed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Tab completion unexpectedly returns intrinsic methods for objects with a type-native ForEach()/Where()

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@rudy-07
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.