(t reflect.Type, vx, vy reflect.Value)
| 550 | } |
| 551 | |
| 552 | func (s *state) comparePtr(t reflect.Type, vx, vy reflect.Value) { |
| 553 | if vx.IsNil() || vy.IsNil() { |
| 554 | s.report(vx.IsNil() && vy.IsNil(), 0) |
| 555 | return |
| 556 | } |
| 557 | |
| 558 | // Cycle-detection for pointers. |
| 559 | if eq, visited := s.curPtrs.Push(vx, vy); visited { |
| 560 | s.report(eq, reportByCycle) |
| 561 | return |
| 562 | } |
| 563 | defer s.curPtrs.Pop(vx, vy) |
| 564 | |
| 565 | vx, vy = vx.Elem(), vy.Elem() |
| 566 | s.compareAny(Indirect{&indirect{pathStep{t.Elem(), vx, vy}}}) |
| 567 | } |
| 568 | |
| 569 | func (s *state) compareInterface(t reflect.Type, vx, vy reflect.Value) { |
| 570 | if vx.IsNil() || vy.IsNil() { |
no test coverage detected