Fix the incorrect error reporting and declaration file emit for the type parameter constraint of private methods
Also incorporates code review feedback