Equal methods for move AbsMoveable

Make sure all the types are comparable
This commit is contained in:
James Bardin 2021-08-05 15:55:28 -04:00
parent 08edb02270
commit 88ad938cc6
1 changed files with 8 additions and 0 deletions

View File

@ -37,6 +37,10 @@ func (c ModuleCall) Absolute(moduleAddr ModuleInstance) AbsModuleCall {
}
}
func (c ModuleCall) Equal(other ModuleCall) bool {
return c.Name == other.Name
}
// AbsModuleCall is the address of a "module" block relative to the root
// of the configuration.
//
@ -70,6 +74,10 @@ func (c AbsModuleCall) Instance(key InstanceKey) ModuleInstance {
return ret
}
func (c AbsModuleCall) Equal(other AbsModuleCall) bool {
return c.Module.Equal(other.Module) && c.Call.Equal(other.Call)
}
type absModuleCallInstanceKey string
func (c AbsModuleCall) UniqueKey() UniqueKey {