Except an important reason why so many large warships (light cruisers and above) were cancelled at the outbreak of World War II and why others took so long to complete or were never completed was that priority was given to the U-boat programme. So there must have been at least some overlap between the resources required to build U-boats and the resources used to build large warships.None of these are of any relevance for U-Boats; one doesn't build a U-Boat or two U-Boats on a Class A/Battleship and Aircraft Carrier slip. Military shipbuilding isn't Tetris. I would also go so far as to say that anything in Class B/Large Cruisers and Light Carrier Slips is also not really what would be used. For a 220ft Type VII or 251ft Type IX, a 300ft-400ft long slip is ideal.
That includes slipways. You've been given photographic evidence by @Dorknought. Another example is that the U-boat that had Ark Royal in its sights when it launched the air strike that sealed Bismarck's fate was built alongside Bismarck.