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

Add test demonstrating a scenario now works #75265

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12620,5 +12620,50 @@ $$
Await state.AssertCompletionItemsContain("SwitchColor", displayTextSuffix:="")
End Using
End Function

<WpfTheory, CombinatorialData>
<WorkItem("https://github.com/dotnet/roslyn/issues/72872")>
Public Async Function CompletionInsideImplicitObjectCreationInsideCollectionExpression(showCompletionInArgumentLists As Boolean) As Task
Using state = TestStateFactory.CreateCSharpTestState(
<Document><![CDATA[
using System.Collections.Generic;

public record Parent
{
public List<Child>? Children { get; init; }
}

public record Child
{
public string? Id { get; init; }
}


internal class Program
{
public string ProgramProp { get; set; }

public void Main(string[] args)
{
var V1 = new Parent()
{
Children = [
new()
{
$$
},
],
};

}
}]]>
</Document>,
showCompletionInArgumentLists:=showCompletionInArgumentLists, languageVersion:=LanguageVersion.CSharp12)

state.SendInvokeCompletionList()
Await state.AssertCompletionSession()
Await state.AssertCompletionItemsContain("Id", displayTextSuffix:="")
End Using
End Function
End Class
End Namespace
Loading