fix Issue 13498 - Return type is not checked in function template
Merge pull request #4004 from 9rnsr/fix13498

[REG2.067a] Issue 13498 - Return type is not checked in function template