diff --git a/src/EditorFeatures/CSharpTest/CodeActions/IntroduceVariable/IntroduceVariableTests.cs b/src/EditorFeatures/CSharpTest/CodeActions/IntroduceVariable/IntroduceVariableTests.cs index e2d6e64c6e3fb661af97c7b7251dc628ad55ee5a..70c3a67675d8ebfc993b14f91271447adece0fbb 100644 --- a/src/EditorFeatures/CSharpTest/CodeActions/IntroduceVariable/IntroduceVariableTests.cs +++ b/src/EditorFeatures/CSharpTest/CodeActions/IntroduceVariable/IntroduceVariableTests.cs @@ -2585,7 +2585,7 @@ class Program { void M() { - Action goo = x => [|x.Goo|]; + Action goo = x => [|x.ToString()|]; } }", @"using System; @@ -2596,7 +2596,7 @@ void M() { Action goo = x => { - object {|Rename:goo1|} = x.Goo; + string {|Rename:v|} = x.ToString(); }; } }"); diff --git a/src/EditorFeatures/VisualBasicTest/CodeActions/IntroduceVariable/IntroduceVariableTests.vb b/src/EditorFeatures/VisualBasicTest/CodeActions/IntroduceVariable/IntroduceVariableTests.vb index 6a2e9239b910f4f481cac911b934f3cd2911e9c3..6324a0e7647b202b85c5332cfefed51b98c1f3a4 100644 --- a/src/EditorFeatures/VisualBasicTest/CodeActions/IntroduceVariable/IntroduceVariableTests.vb +++ b/src/EditorFeatures/VisualBasicTest/CodeActions/IntroduceVariable/IntroduceVariableTests.vb @@ -432,11 +432,13 @@ End Class" Public Async Function TestSharedModifierAbsentInGeneratedModuleFields() As Task Dim source = "Module Program + Private ReadOnly y As Integer = 1 Dim x = Goo([|2 + y|]) End Module" Dim expected = "Module Program - Private ReadOnly {|Rename:p|} As Object = 2 + y - Dim x = Goo(p) + Private ReadOnly y As Integer = 1 + Private ReadOnly {|Rename:v|} As Integer = 2 + y + Dim x = Goo(v) End Module" Await TestInRegularAndScriptAsync(source, expected) End Function