dotnet/roslyn

CSharpDecompiledSourceService doesn't support nested types

オープン

#46,076 opened on 2020/07/17

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)C# (4,257 件のフォーク)batch import
Area-IDEBughelp wanted

Repository metrics

Stars
 (20,414 個のスター)
PR merge metrics
 (平均マージ 6d 17h) (30d で 256 merged PRs)

説明

Version Used: 16.6.3

Steps to Reproduce: Reference a nested type from a .dll and try to decompile it

InvalidOperationException: Could not find type definition A.NestedClass in type system.

  | CSharpDecompiler.DecompileType Line 817
-- | --
  | CSharpDecompiler.DecompileTypeAsString Line 840
  | CSharpDecompiledSourceService.PerformDecompilation Line 115
  | CSharpDecompiledSourceService.<AddSourceToAsync>d__3.MoveNext Line 74

This method should append the names of parent types (and probably use the + separator?) https://github.com/dotnet/roslyn/blob/8bedf286254d901c48f2cfd562cf3425de2b2e10/src/EditorFeatures/CSharp/DecompiledSource/CSharpDecompiledSourceService.cs#L160-L175

コントリビューターガイド