fix issue 10596 - A method with out contract and auto return type causes
segfault