It does affect the cardinality estimator if you use a different variable and set it using your parameter.
If you use the parameter directly, then it won't affect the cardinality estimator.
I did a quick test on the stackoverflow datbase and if you look at this, you will notice that when you use local variable, the estimated number of row is different then, but the same as when you don'tset the parameter with himself.