Confirmed Walter's comment. Indeed the culprit is the keyword end. Here is minimal working example.
function val = get.x(~)
val = [1,2,3];
>> obj = Untitled;
This behavior is mostly benign but occasionally troublesome, and easy to fix. I think this is a case for an m-lint message at least.