DeclarationIsEquivalent returns true if one variable declaration has the same name and same type as the input.
(other *VariableDecl)
| 1092 | |
| 1093 | // DeclarationIsEquivalent returns true if one variable declaration has the same name and same type as the input. |
| 1094 | func (v *VariableDecl) DeclarationIsEquivalent(other *VariableDecl) bool { |
| 1095 | if v == other { |
| 1096 | return true |
| 1097 | } |
| 1098 | return v.Name() == other.Name() && v.Type().IsEquivalentType(other.Type()) |
| 1099 | } |
| 1100 | |
| 1101 | // TypeVariable creates a new type identifier for use within a types.Provider |
| 1102 | func TypeVariable(t *types.Type) *VariableDecl { |