In one of the poems we read for this class, a dead speaker b…

In one of the poems we read for this class, a dead speaker believes her dog to be digging on her grave because of its loyalty. However, she finds out that the dog is only digging on her grave to bury a bone and really had forgotten about its dead owner. What literary device is this an example of?