Browse Source

YieldReturnDecompiler: don't require that class name starts with '<'

http://community.sharpdevelop.net/forums/t/13143.aspx
pull/166/head
Daniel Grunwald 15 years ago
parent
commit
9fdd6539e2
  1. 2
      ICSharpCode.Decompiler/ILAst/YieldReturnDecompiler.cs

2
ICSharpCode.Decompiler/ILAst/YieldReturnDecompiler.cs

@ -179,7 +179,7 @@ namespace ICSharpCode.Decompiler.ILAst @@ -179,7 +179,7 @@ namespace ICSharpCode.Decompiler.ILAst
public static bool IsCompilerGeneratorEnumerator(TypeDefinition type)
{
if (!(type.Name.StartsWith("<", StringComparison.Ordinal) && type.IsCompilerGenerated()))
if (!(type.DeclaringType != null && type.IsCompilerGenerated()))
return false;
foreach (TypeReference i in type.Interfaces) {
if (i.Namespace == "System.Collections" && i.Name == "IEnumerator")

Loading…
Cancel
Save