The problem is that companies use any salary information you provide as a candidate to adjust their offer. A lot of companies that asked me what I made at my previous job (even though it is illegal to ask in Germany) offered me just 20% on top of my number.
This makes me think that all jobs position should have rather narrow target ranges which are stated up-front. Then you can discuss if you are too high level/low level for that job and range.