Fix #142 Issue about empty-array for array type in function

- added fix

- added test