What a dill! I thought my return type for the function was correct (i.e. – string) but on further examination it was actually set to ‘void’. Silly, not to have checked all angles before reporting on this one. However, from another viewpoint it’s an opportunity to re-iterate the message of ‘strong typing’ in languages.
Although, I really should have picked this one up earlier, I have to say that the message associated with the error was somewhat misleading in suggesting that a return statement is not necessary in a class-based function.
The discussions had at xtUML Days 2019 surrounding MASL and strongly typed languages should be followed up closely – especially as there’s significantly greater opportunity to identify and label errors more meaningfully.
On this occasion it was/is the ‘typing’ that was picked up, but reported obscurely.