The A 50/1.7 is way sharper (and probably one of the *sharpest* normals out there) than the "pancake" 40/2.8.
There are some lenses that have been changed between the M and A versions, but most lenses are pretty much the same.