Peter did not directly tell him he had a demon, but what he says about him implies that Simon was in bondage to demonic thinking.
When we see people whose thinking is purely and exclusively perverted, rest assured they are fellowshipping with demons.