DeclarationIsEquivalent returns true if one variable declaration has the same name and same type as the input.
(other *VariableDecl)
| 1180 | |
| 1181 | // DeclarationIsEquivalent returns true if one variable declaration has the same name and same type as the input. |
| 1182 | func (v *VariableDecl) DeclarationIsEquivalent(other *VariableDecl) bool { |
| 1183 | if v == other { |
| 1184 | return true |
| 1185 | } |
| 1186 | return v.Name() == other.Name() && v.Type().IsEquivalentType(other.Type()) |
| 1187 | } |
| 1188 | |
| 1189 | // TypeVariable creates a new type identifier for use within a types.Provider |
| 1190 | func TypeVariable(t *types.Type) *VariableDecl { |