Skip to content

Commit

Permalink
Merge pull request #138 from esdrubal/ImportScope
Browse files Browse the repository at this point in the history
Avoid self reference in ImportScope.
  • Loading branch information
jbevain committed Aug 6, 2013
2 parents 89cfb1d + eed32f8 commit 6468dd8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Mono.Cecil/Import.cs
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ IMetadataScope ImportScope (IMetadataScope scope)
case MetadataScopeType.AssemblyNameReference:
return ImportAssemblyName ((AssemblyNameReference) scope);
case MetadataScopeType.ModuleDefinition:
if (scope == module) return scope;
return ImportAssemblyName (((ModuleDefinition) scope).Assembly.Name);
case MetadataScopeType.ModuleReference:
throw new NotImplementedException ();
Expand Down

0 comments on commit 6468dd8

Please sign in to comment.