提交 3eaae1fd 编写于 作者: C CyrusNajmabadi

Always insert the insertion text, even when we can't resolve symbols.

上级 ee44aee1
......@@ -1839,6 +1839,29 @@ class Program
End Using
End Function
<WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
<WorkItem(12254, "https://github.com/dotnet/roslyn/issues/12254")>
Public Async Function TestGenericCallOnTypeContainingAnonymousType() As Task
Using state = TestState.CreateCSharpTestState(
<Document><![CDATA[
using System.Linq;
class Program
{
static void Main(string[] args)
{
new[] { new { x = 1 } }.ToArr$$
}
}]]></Document>, extraExportedTypes:={GetType(CSharpEditorFormattingService)}.ToList())
state.SendInvokeCompletionList()
state.SendTypeChars("(")
Await state.WaitForAsynchronousOperationsAsync().ConfigureAwait(True)
state.AssertMatchesTextStartingAtLine(7, "new[] { new { x = 1 } }.ToArray(")
End Using
End Function
<WpfFact, Trait(Traits.Feature, Traits.Features.Completion)>
Public Async Function TargetTypePreselectionSetterValuey() As Task
Using state = TestState.CreateCSharpTestState(
......
......@@ -347,7 +347,7 @@ private Task<AbstractSyntaxContext> GetOrCreateContext(Document document, int po
}
else
{
insertionText = selectedItem.DisplayText;
insertionText = SymbolCompletionItem.GetInsertionText(selectedItem);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册