Improving the UI of generics

What bad would it make if compiler generated an optimised version of func foo(apple: Int) {} for the second version? In other words treated the second version as if it was written as the first version, early in the compilation process.