Issue 2350 - Contracts with a naked body are indecent

Error on a naked function with contracts instead of generating wrong code
Merge pull request #3937 from yebblies/issue2350

Issue 2350 - Contracts with a naked body are indecent