Skip to content

Commit

Permalink
Feedback: Use regular type cast and move to a shared library.
Browse files Browse the repository at this point in the history
  • Loading branch information
pawchen committed Jan 9, 2022
1 parent e26476c commit 1eed89b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
<ProjectReference Include="..\..\Portable\Microsoft.CodeAnalysis.CSharp.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Emit\Emit\EditAndContinue\EditAndContinueTestBase.cs">
<Link>Emit\EditAndContinue\EditAndContinueTestBase.cs</Link>
</Compile>
<Compile Include="..\Emit\Emit\EditAndContinue\SemanticEditDescription.cs">
<Link>Emit\EditAndContinue\SemanticEditDescription.cs</Link>
</Compile>
<Compile Include="..\..\..\Core\MSBuildTask\MvidReader.cs">
<Link>Emit\MvidReader.cs</Link>
</Compile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public static class EditAndContinueTestExtensions
{
internal static CSharpCompilation WithSource(this CSharpCompilation compilation, CSharpTestSource newSource)
{
var previousParseOptions = compilation.SyntaxTrees.FirstOrDefault()?.Options as CSharpParseOptions;
var previousParseOptions = (CSharpParseOptions)compilation.SyntaxTrees.FirstOrDefault()?.Options;
return compilation.RemoveAllSyntaxTrees().AddSyntaxTrees(newSource.GetSyntaxTrees(previousParseOptions));
}

Expand Down

0 comments on commit 1eed89b

Please sign in to comment.