fix promotion for constructor functions
add tests for constructor functions
implement review comments
3 files changed