DeclarationIsEquivalent returns true if one variable declaration has the same name and same type as the input.
(other *VariableDecl)
| 1082 | |
| 1083 | // DeclarationIsEquivalent returns true if one variable declaration has the same name and same type as the input. |
| 1084 | func (v *VariableDecl) DeclarationIsEquivalent(other *VariableDecl) bool { |
| 1085 | if v == other { |
| 1086 | return true |
| 1087 | } |
| 1088 | return v.Name() == other.Name() && v.Type().IsEquivalentType(other.Type()) |
| 1089 | } |
| 1090 | |
| 1091 | // TypeVariable creates a new type identifier for use within a types.Provider |
| 1092 | func TypeVariable(t *types.Type) *VariableDecl { |