App D4 21.3
If the frame is legal and the slide and barrel is the same length, contour, and caliber as the factory version for that frame, you are fine
A better question is: if you put a 9mm barrel and slide on a .40 frame, technically you can't do that, but it is LITERALLY impossible to determine unless you are the government and know what serial number goes with what gun.