A law like this in Afghanistan would wipe out most of the male population. They like to play with their little boys - bacha bazi, or something like that.
Pederasty is not illegal under Islam. Only gay sex with another adult man, or a man being effeminate.