Change warning to error

Fairly trivial patch - in the case where a return type is specified for a function but there are paths where nothing is returned we had previously only generated a warning.  Now we generate an error.

Altered the relevant test case.