Home | History | Annotate | Download | only in types

Lines Matching refs:identical

113 // Identical reports whether x and y are identical types.
115 func Identical(x, y Type) bool {
116 return identical(x, y, true, nil)
119 // IdenticalIgnoreTags reports whether x and y are identical types if tags are ignored.
122 return identical(x, y, false, nil)
131 func (p *ifacePair) identical(q *ifacePair) bool {
135 func identical(x, y Type, cmpTags bool, p *ifacePair) bool {
150 // Two array types are identical if they have identical element types
153 return x.len == y.len && identical(x.elem, y.elem, cmpTags, p)
157 // Two slice types are identical if they have identical element types.
159 return identical(x.elem, y.elem, cmpTags, p)
163 // Two struct types are identical if they have the same sequence of fields,
164 // and if corresponding fields have the same names, and identical types,
165 // and identical tags. Two anonymous fields are considered to have the same
174 !identical(f.typ, g.typ, cmpTags, p) {
183 // Two pointer types are identical if they have identical base types.
185 return identical(x.base, y.base, cmpTags, p)
189 // Two tuples types are identical if they have the same number of elements
190 // and corresponding elements have identical types.
196 if !identical(v.typ, w.typ, cmpTags, p) {
206 // Two function types are identical if they have the same number of parameters
207 // and result values, corresponding parameter and result types are identical,
212 identical(x.params, y.params, cmpTags, p) &&
213 identical(x.results, y.results, cmpTags, p)
217 // Two interface types are identical if they have the same set of methods with
218 // the same names and identical function types. Lower-case method names from
248 if p.identical(q) {
259 if f.Id() != g.Id() || !identical(f.typ, g.typ, cmpTags, q) {
268 // Two map types are identical if they have identical key and value types.
270 return identical(x.key, y.key, cmpTags, p) && identical(x.elem, y.elem, cmpTags, p)
274 // Two channel types are identical if they have identical value types
277 return x.dir == y.dir && identical(x.elem, y.elem, cmpTags, p)
281 // Two named types are identical if their type names originate