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

Explicit interface member completion doesn't work with params collections #72224

Closed
AlekseyTs opened this issue Feb 22, 2024 · 2 comments · Fixed by #75568
Closed

Explicit interface member completion doesn't work with params collections #72224

AlekseyTs opened this issue Feb 22, 2024 · 2 comments · Fixed by #75568

Comments

@AlekseyTs
Copy link
Contributor

        [Fact]
        public async Task TestWithParamsCollectionParameter()
        {
            var markup = """
                using System.Collections.Generic;

                interface I
                {
                    void M(params IEnumerable<string> args);
                }

                class C : I
                {
                    void I.$$
                }
                """;

            var expected = """
                using System.Collections.Generic;

                interface I
                {
                    void M(params IEnumerable<string> args);
                }

                class C : I
                {
                    void I.M(params IEnumerable<string> args)
                }
                """;

            await VerifyProviderCommitAsync(markup, "M(params IEnumerable<string> args)", expected, '\t');
        }

Observed:

Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Completion.CompletionProviders.ExplicitInterfaceMemberCompletionProviderTests.TestWithParamsCollectionParameter [FAIL]
  Assert.Contains() Failure
  Not found: (filter expression)
  In value:  SegmentedList<CompletionItem> [M(params System.Collections.Generic.IEnumerable<string> args)]
  Stack Trace:
    D:\GitHub\roslyn\src\EditorFeatures\TestUtilities\Completion\AbstractCompletionProviderTests.cs(588,0): at Microsoft.CodeAnalysis.Editor.UnitTests.Completion.AbstractCompletionProviderTests`1.<VerifyProviderCommitCheckResultsAsync>d__59.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
    D:\GitHub\roslyn\src\EditorFeatures\TestUtilities\Completion\AbstractCompletionProviderTests.cs(573,0): at Microsoft.CodeAnalysis.Editor.UnitTests.Completion.AbstractCompletionProviderTests`1.<VerifyProviderCommitWorkerAsync>d__58.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
    D:\GitHub\roslyn\src\EditorFeatures\TestUtilities\Completion\AbstractCompletionProviderTests.cs(320,0): at Microsoft.CodeAnalysis.Editor.UnitTests.Completion.AbstractCompletionProviderTests`1.<VerifyProviderCommitAsync>d__45.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
    D:\GitHub\roslyn\src\EditorFeatures\CSharpTest\Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProviderTests.cs(821,0): at Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Completion.CompletionProviders.ExplicitInterfaceMemberCompletionProviderTests.<TestWithParamsCollectionParameter>d__29.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
@CyrusNajmabadi
Copy link
Member

Not repro. This produces:

Image

@CyrusNajmabadi CyrusNajmabadi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
@AlekseyTs
Copy link
Contributor Author

There was a skipped test for this issue. Is it no longer skipped?

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

Successfully merging a pull request may close this issue.

3 participants