I happened to have used 40mm pancake on cropped and full frame camera, and 50 1.4 of canon and a good copy of sigma. the 40mm pancake is among the most sharpest lenses that Canon made, it is even sharper than my L lens (24-105) w wide open. IMHO 50 1.4 canon is too soft below f2, so you get usable aperture about 1 more stop than 40 2.8. you would prolly not be so impressed by the sharpness when you get this 50 1.4. The field of view is very similar, and great for portrait. if you by this 50 1.4, you'll get faster focus, focus distance marker, and again, tighter FOV and soft wide open. yea for sure if you stop down to f2.8 it will be as sharp, but note that the shape of aperture blades on a 50 1.4 will not be as circular as 40 full open.
I have the 50mm 1.8 and the 40mm 2.8. The 50mm drop onto a tile floor recently and it doesnt work well anymore. I was thinking of purchasing the 50mm 1.4 but after reading what you have said above it seems the 40mm is a good replacement for the 50mm. I probably will get the 28mm 1.8 lens instead if it ever goes on sale and use it as my new indoor low light lens.