SignatureEquals determines whether the incoming overload declaration signature is equal to the current signature. Result type, operand trait, and strict-ness are not considered as part of signature equality.
(other *OverloadDecl)
| 716 | // |
| 717 | // Result type, operand trait, and strict-ness are not considered as part of signature equality. |
| 718 | func (o *OverloadDecl) SignatureEquals(other *OverloadDecl) bool { |
| 719 | if o == other { |
| 720 | return true |
| 721 | } |
| 722 | if o.ID() != other.ID() || o.IsMemberFunction() != other.IsMemberFunction() || len(o.ArgTypes()) != len(other.ArgTypes()) { |
| 723 | return false |
| 724 | } |
| 725 | for i, at := range o.ArgTypes() { |
| 726 | oat := other.ArgTypes()[i] |
| 727 | if !at.IsEquivalentType(oat) { |
| 728 | return false |
| 729 | } |
| 730 | } |
| 731 | return o.ResultType().IsEquivalentType(other.ResultType()) |
| 732 | } |
| 733 | |
| 734 | // SignatureOverlaps indicates whether two functions have non-equal, but overloapping function signatures. |
| 735 | // |
no test coverage detected