How is that going to work if you interview Bob for X task at Y pay, but discover Bob would be much better suited for A task that is worth more salary? What if Bob didn't meet the requirements for X, but would be a perfect fit for B task that is not worth as much salary?
Then you tell Bob about how he would be much better suited for job A or B, explain how the pay is less, and if he's cool with it, directly put his CV into the pile for that job. If he's not cool with it, shake his hand and wish him a good day
Well then they'd be interviewing for a different job. I assume it's no different at any other company where they actually do include the salary range
Cancel the job posting - advertise again for A task, Bob already passed some of the stages, maybe see a few more candidates for A task and boom you are in business.
Presumably the law will be written to account for advertised role != assigned role, but it can't account for gaming the system by never hiring exactly the advertised position.
I suspect that kind of bait and switch will become the norm.
[dead]
The replies are all about workarounds for the law.
So what is the point of the law, if there are all these workarounds?
The requirement is to publish either minimal salary or salary range for the position from the advertisement. If company has several positions available then specific minimal salaries should be given for each.