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)
| 760 | // |
| 761 | // Result type, operand trait, and strict-ness are not considered as part of signature equality. |
| 762 | func (o *OverloadDecl) SignatureEquals(other *OverloadDecl) bool { |
| 763 | if o == other { |
| 764 | return true |
| 765 | } |
| 766 | if o.ID() != other.ID() || o.IsMemberFunction() != other.IsMemberFunction() || len(o.ArgTypes()) != len(other.ArgTypes()) { |
| 767 | return false |
| 768 | } |
| 769 | for i, at := range o.ArgTypes() { |
| 770 | oat := other.ArgTypes()[i] |
| 771 | if !at.IsEquivalentType(oat) { |
| 772 | return false |
| 773 | } |
| 774 | } |
| 775 | return o.ResultType().IsEquivalentType(other.ResultType()) |
| 776 | } |
| 777 | |
| 778 | // SignatureOverlaps indicates whether two functions have non-equal, but overloapping function signatures. |
| 779 | // |
no test coverage detected