Browse Source

Fixed some completion unit tests.

I'm not 100% sure if that's the best solution fixing this, but makes
things easier for now.
newNRvisualizers
Mike Krüger 14 years ago
parent
commit
2bc61057e9
  1. 4
      ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultTypeDefinition.cs

4
ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultTypeDefinition.cs

@ -615,13 +615,13 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
{ {
// Two ITypeDefinitions are considered to be equal if they have the same compound class. // Two ITypeDefinitions are considered to be equal if they have the same compound class.
ITypeDefinition typeDef = other as ITypeDefinition; ITypeDefinition typeDef = other as ITypeDefinition;
return typeDef != null && this.GetDefinition() == typeDef.GetDefinition(); return typeDef != null && this.ProjectContent == typeDef.ProjectContent && this.GetDefinition().ReflectionName == typeDef.GetDefinition().ReflectionName;
} }
public override bool Equals(object obj) public override bool Equals(object obj)
{ {
ITypeDefinition typeDef = obj as ITypeDefinition; ITypeDefinition typeDef = obj as ITypeDefinition;
return typeDef != null && this.GetDefinition() == typeDef.GetDefinition(); return typeDef != null && this.ProjectContent == typeDef.ProjectContent && this.GetDefinition().ReflectionName == typeDef.GetDefinition().ReflectionName;
} }
public override int GetHashCode() public override int GetHashCode()

Loading…
Cancel
Save