It will call the getX() of whatever top() returns

The two examples at the end of your post would have identical results